Import
tsx
import { Command } from "@indoku/ui"Examples
Basic usage
tsx
Props
Root
| Prop | Type | Default | Description |
|---|---|---|---|
shouldFilter | boolean | true | Turn off built-in filtering when you filter yourself (e.g. server results). |
search | string | – | Controlled search text. |
onSearchChange | (search: string) => void | – | |
loop | boolean | true | Arrow down on the last item wraps to the first. |
Group
| Prop | Type | Default | Description |
|---|---|---|---|
heading | ReactNode | – |
Item
| Prop | Type | Default | Description |
|---|---|---|---|
value | string | – | Text matched against the search. Defaults to children when it is a string. |
keywords | string[] | – | Extra keywords used by search. |
disabled | boolean | – | |
onSelect | (value: string) => void | – |
Dialog
| Prop | Type | Default | Description |
|---|---|---|---|
open* | boolean | – | |
onOpenChange* | (open: boolean) => void | – | |
hotkey | string | – | Shortcut letter (used with Cmd/Ctrl), e.g. "k" for Cmd/Ctrl+K. |
title | string | – | Accessible label of the dialog. |
* required. Style props and HTML attributes are accepted as well.
Created by @indokudev