A strict, minimalist command menu component.
A fast, composable, unstyled command menu for React. Stripped of border-radius to align with the Monolith architectural grid.
No results found.
Suggestions
Calendar
Search Emoji
Calculator
Installation
$ pnpm dlx shadcn@latest add "https://ui.manpuc.me/r/command.json"
Copy
Usage
Copy import {
Command,
CommandDialog,
CommandEmpty,
CommandGroup,
CommandInput,
CommandItem,
CommandList,
CommandSeparator,
CommandShortcut,
} from "@/components/ui/command"
export function CommandDemo () {
return (
< Command >
< CommandInput placeholder = "Type a command or search..." />
< CommandList >
< CommandEmpty >No results found.</ CommandEmpty >
< CommandGroup heading = "Suggestions" >
< CommandItem >Calendar</ CommandItem >
< CommandItem >Search Emoji</ CommandItem >
< CommandItem >Calculator</ CommandItem >
</ CommandGroup >
</ CommandList >
</ Command >
)
}
Examples
Default
No results found.
Suggestions
Calendar
Search Emoji
Calculator
Dialog
Command can be rendered inside a dialog for global search menus. Try pressing ⌘J in the preview below.
API Reference
The Command component is built on top of cmdk .
Prop Type Default Description valuestring- The controlled value of the command menu. onValueChangefunction- Event handler called when the value changes. shouldFilterbooleantrueWhether to filter the items based on the input value. filterfunction- Custom filter function. loopbooleanfalseWhether to loop keyboard navigation.
CommandDialog
Prop Type Default Description titlestring"Command Menu"Accessible title for the dialog. Required for screen readers.