Accessible label for this command menu. Not shown visibly.
shouldFilter
boolean
-
Optionally set to false to turn off the automatic filtering and sorting. If false, you must conditionally render valid items based on the search query yourself.
filter
CommandFilter
-
Custom filter function for whether each command menu item should matches the given search query. It should return a number between 0 and 1, with 1 being the best match and 0 being hidden entirely. By default, uses the command-score library.
value
string
-
Optional controlled state of the selected command menu item.
onValueChange
((value: string) => void)
-
Event handler called when the selected item of the menu changes.
loop
boolean
-
Optionally set to true to turn on looping around when using the arrow keys.
disablePointerSelection
boolean
-
Optionally set to true to disable selection via pointer events.
vimBindings
boolean
-
Set to false to disable ctrl+n/j/p/k shortcuts. Defaults to true.
Event handler for when this item is selected, either via click or keyboard selection.
value
string
-
A unique value for this item. If no value is provided, it will be inferred from children or the rendered textContent. If your textContent changes between renders, you must provide a stable, unique value.
keywords
string[]
-
Optional keywords to match against when filtering.
forceMount
boolean
-
Whether this item is forcibly rendered regardless of filtering.