Search documentation

Search the documentation and open a page.

A command menu for searching and selecting actions.

Loading...

Installation

pnpm dlx shadcn@latest add @wirekyt/command

Composition

Command | CommandDialog ├── CommandInput └── CommandList ├── CommandEmpty ├── CommandGroup │ ├── CommandGroupLabel │ └── CommandItem │ ├── CommandItemText │ └── CommandShortcut (optional) └── CommandSeparator (optional)

Examples

Default

Loading...

Dialog

Loading...

Empty

Loading...

In A Popover

Loading...

Nested Pages

Loading...

With Tabs

Loading...

Workspace Switcher

Loading...

API Reference

Command

PropTypeDefaultDescription
idstring | undefined—Unique identifier used to connect the component parts.
orientation"horizontal" | "vertical" | undefined"horizontal"Sets the component orientation and keyboard navigation axis.
idsElementIds | undefined—Overrides generated identifiers for individual parts.
disabledboolean | undefinedfalseDisables interaction with the component.
disallowSelectAllboolean | undefined—Configures disallow select all.
onHighlightChange((details: HighlightChangeDetails<T>) => void) | undefined—Runs when highlight changes.
onValueChange((details: ValueChangeDetails<T>) => void) | undefined—Runs when value changes.
valuestring[] | undefined—Current value when the component is controlled.
defaultValuestring[] | undefined—Initial value when the component is uncontrolled.
highlightedValuestring | null | undefined—Configures highlighted value.
defaultHighlightedValuestring | null | undefined—Configures default highlighted value.
loopFocusboolean | undefined—Configures loop focus.
selectionModeSelectionMode | undefined—Configures selection mode.
scrollToIndexFn((details: ScrollToIndexDetails) => void) | undefined—Configures scroll to index fn.
selectOnHighlightboolean | undefined—Configures select on highlight.
deselectableboolean | undefined—Configures deselectable.
typeaheadboolean | undefined—Configures typeahead.
onSelect((details: SelectionDetails) => void) | undefined—Runs when select changes.

Context, Hooks, and Types

ExportAPI
useListCollectionCreates or accesses the component API.

Utilities and Supporting Types

ExportAPI
createListCollectionCreates the typed collection consumed by the component.