Command
shadcn/uiFast, composable, unstyled command menu for React.
Command
Installation
Props
<Command />
Name | Type | |
|---|---|---|
shouldFilter | boolean(default: true) | |
filter | ((value: string, search: string, keywords?: string[]) => number) | |
loop | boolean(default: true) | |
render | React.ReactElement |
<CommandDialog />
Name | Type | |
|---|---|---|
description | string(default: Search for a command to run...) | |
showCloseButton | boolean(default: false) | |
onOpenChange | (...args) => void | |
open | boolean | |
defaultOpen | boolean | |
onOpenChangeComplete | ((open: boolean) => void) | |
triggerId | string | |
defaultTriggerId | string | |
modal | boolean | "trap-focus" | |
disablePointerDismissal | boolean | |
render | React.ReactElement |
<CommandInput />
Name | Type | |
|---|---|---|
onValueChange | ((search: string) => void) | |
render | React.ReactElement |
<CommandList />
Name | Type | |
|---|---|---|
render | React.ReactElement |
<CommandEmpty />
Name | Type | |
|---|---|---|
render | React.ReactElement |
<CommandGroup />
Name | Type | |
|---|---|---|
heading | React.ReactNode | |
render | React.ReactElement |
<CommandItem />
Name | Type | |
|---|---|---|
keywords | string[] | |
onPointerMove | React.PointerEventHandler<HTMLDivElement> | |
render | React.ReactElement |
<CommandShortcut />
Name | Type | |
|---|---|---|
render | React.ReactElement |
<CommandSeparator />
Name | Type | |
|---|---|---|
render | React.ReactElement |