Components
Command
A command menu component for searching and executing actions, supporting both inline and modal dialog modes.
The Command component provides a search input, list items, grouped categories, and optional modal dialog capability.
Usage
import { Command } from "@/components/ui/command";
export function CommandExample() {
return (
<Command.Root>
<Command.Input placeholder="Type a command or search..." />
<Command.List>
<Command.Empty>No results found.</Command.Empty>
<Command.Group heading="Actions">
<Command.Item>
<span>New File</span>
<Command.Shortcut>⌘N</Command.Shortcut>
</Command.Item>
<Command.Item>
<span>Copy Link</span>
<Command.Shortcut>⌘C</Command.Shortcut>
</Command.Item>
</Command.Group>
</Command.List>
</Command.Root>
);
}Preview
No results found.
Suggestions
Calendar
Search Emoji⌘E
Calculator
Settings
Profile⌘P
Billing⌘B
Settings⌘S
Anatomy
<Command.Root>
<Command.Input />
<Command.List>
<Command.Empty />
<Command.Group heading="...">
<Command.Item>
<Command.Shortcut />
</Command.Item>
<Command.Separator />
</Command.Group>
</Command.List>
</Command.Root>Modal Dialog Mode
<Command.Dialog open={open} onOpenChange={setOpen}>
<Command.Input placeholder="Search..." />
<Command.List>
<Command.Item>Action</Command.Item>
</Command.List>
</Command.Dialog>Combobox
A high-quality, styled React combobox component built with @base-ui/react that renders an input combined with a list of predefined items to select.
Context Menu
A high-quality, styled React context menu component built with @base-ui/react that appears at the pointer on right click or long press.