Skip to content

Command

Fast, composable command palette.

Calendar
Search emoji
Calculator
Profile⌘P
Billing⌘B
Settings⌘S

Install

Bash
npx @madeui/cli add command

Usage

TSX
import {
  Command,
  CommandDialog,
  CommandEmpty,
  CommandGroup,
  CommandInput,
  CommandItem,
  CommandList,
  CommandShortcut,
} from '@/components/ui/command';

Composition

TSX
<Command items={items}>
  <CommandInput />
  <CommandEmpty />
  <CommandList>
    {(item) => <CommandItem value={item} />}
  </CommandList>
</Command>

Groups

Suggestions
Calendar
Search emoji
Settings
Profile⌘P
Billing⌘B

Scrollable

Apple
Apricot
Banana
Blackberry
Blueberry
Cantaloupe
Cherry
Clementine
Coconut
Cranberry
Date
Dragonfruit
Elderberry
Fig
Grape
Grapefruit
Guava
Honeydew
Kiwi
Lemon
Lime
Lychee
Mango
Mandarin
Nectarine
Orange
Papaya
Passionfruit
Peach
Pear
Persimmon
Pineapple
Plum
Pomegranate
Raspberry
Star fruit
Strawberry
Tangerine
Watermelon

Keyboard shortcut

Open the palette with ⌘K / Ctrl K using the useHotkey helper (npx @madeui/cli add use-hotkey).

API reference

Built on Base UI Autocomplete in inline open mode — the filtered list renders in place with no popup, like a command palette, with no extra dependency. Pass items to Command; filtering and highlight ship with the primitive, and CommandList accepts a render function over the filtered items. All other props are forwarded to the Base UI Root (filter, onValueChange, itemToStringLabel, …); see the Base UI Autocomplete API reference.

CommandDialog

Wraps the palette in our Dialog (installed as a dependency), positioned at the top third with no close button.

PropTypeDefaultDescription
titlestring'Command Palette'Screen-reader-only dialog title.
descriptionstring'Search for a command to run…'Screen-reader-only description.

CommandGroup

PropTypeDefaultDescription
headingReactNode—Renders a muted group label above the items.

Every part accepts a style prop (StyleXStyles, merged last).

Was this page helpful?