Command
Fast, composable, unstyled command menu for React.
Preview
No results found.
Calendar
Search
Settings
Usage
<ui-command class="rounded-lg border shadow-md max-w-md">
<ui-command-input placeholder="Type a command or search..."></ui-command-input>
<ui-command-list>
<ui-command-empty>No results found.</ui-command-empty>
<ui-command-group heading="Suggestions">
<ui-command-item>Calendar</ui-command-item>
<ui-command-item>Search</ui-command-item>
<ui-command-item>Settings</ui-command-item>
</ui-command-group>
</ui-command-list>
</ui-command>
Sub-components
<ui-command> <ui-command-dialog> <ui-command-input> <ui-command-list> <ui-command-empty> <ui-command-group> <ui-command-item> <ui-command-separator> <ui-command-shortcut>
Props
<ui-command-input>
| Prop | Type | Default | Description |
|---|
placeholder | string | — | Input placeholder text. |
<ui-command-group>
| Prop | Type | Default | Description |
|---|
heading | string | — | Group heading text. |
<ui-command-item> Custom wrapper
| Prop | Type | Default | Description |
|---|
value | string | — | The value of the item. |
href | string | — | URL to navigate to. Renders as a link when set. (Custom prop) |
All components also accept standard HTML attributes (class, id, style, data-*, aria-*, etc.) which are passed through to the underlying element.