Command Component

Clean command palette with ink-line borders and subtle hover effects.

Inline Command Menu

Command Dialog

Press K to open the command palette, or click the button below.

Command Palette

Search for a command to run...

Accent Hover Variant

Items with light purple background on hover. Use data-[selected=true]:bg-accent/20 on CommandItem.

With Scroll Area

Explicitly set height with ScrollArea for long lists.

File Browser

Click on a folder to browse its contents.

Action Categories

Settings

API Reference

Based on cmdk library.

Command

PropTypeDefaultDescription
classNamestring-Optional CSS class names for styling

CommandDialog

PropTypeDefaultDescription
openbooleanfalseControls whether the dialog is open
onOpenChange(open: boolean) => void-Callback when dialog open state changes

CommandInput

PropTypeDefaultDescription
placeholderstring-Placeholder text for the input field
classNamestring-Optional CSS class names for styling

CommandList

PropTypeDefaultDescription
classNamestring-Optional CSS class names for styling

CommandEmpty

PropTypeDefaultDescription
childrenReactNode-Content displayed when no results found

CommandGroup

PropTypeDefaultDescription
headingstring | ReactNode-Title/heading for the group
classNamestring-Optional CSS class names for styling

CommandItem

PropTypeDefaultDescription
onSelect(value: string) => void-Callback when item is selected
disabledbooleanfalseWhether the item is disabled
classNamestring-Optional CSS class names for styling

CommandSeparator

PropTypeDefaultDescription
classNamestring-Optional CSS class names for styling

CommandShortcut

PropTypeDefaultDescription
childrenstring-Keyboard shortcut text to display

Notes

  • All Command subcomponents are built on top of the cmdk library
  • Use CommandInput for filtering/search functionality
  • Group related items with CommandGroup for better organization
  • Use CommandDialog for modal command palettes