Command Bar
Searches and executes grouped application actions from a modal keyboard surface.
@rivetui/command-barPreview
Explore each composition interactively, then open its code in the same context.
Default
The global shortcut is disabled inside the documentation preview.
Selection callback
Select an action to inspect it.
Registry
Installation
Add the component source and its declared dependencies with the shadcn CLI.
Install component
bunx --bun shadcn@latest add @rivetui/command-barPublic interface
API reference
Component-specific props are listed here. Native element and Base UI props continue to pass through.
| Prop | Type | Default |
|---|---|---|
actions | readonly CommandBarAction[] | — |
open | boolean | — |
defaultOpen | boolean | false |
onOpenChange | (open: boolean) => void | — |
label | string | "Command bar" |
placeholder | string | "Search commands" |
emptyMessage | ReactNode | "No commands found." |
hotkey | boolean | true |
closeOnSelect | boolean | true |
onActionSelect | (action) => void | — |