Fabricator UI
Search documentation
Search pages, components, blocks, styles and colours.
Command menu for search and quick actions.
Installation
Usage
import {
Command,
CommandDialog,
CommandEmpty,
CommandGroup,
CommandInput,
CommandItem,
CommandList,
CommandSeparator,
CommandShortcut,
} from "@/components/ui/command"<Command className="max-w-sm rounded-lg border">
<CommandInput placeholder="Type a command or search..." />
<CommandList
renderEmptyState={() => <CommandEmpty>No results found.</CommandEmpty>}
>
<CommandGroup heading="Suggestions">
<CommandItem>Calendar</CommandItem>
<CommandItem>Search Emoji</CommandItem>
<CommandItem>Calculator</CommandItem>
</CommandGroup>
<CommandSeparator />
<CommandGroup heading="Settings">
<CommandItem>Profile</CommandItem>
<CommandItem>Billing</CommandItem>
<CommandItem>Settings</CommandItem>
</CommandGroup>
</CommandList>
</Command>Composition
Use the following composition to build a Command:
Command
├── CommandInput
└── CommandList
├── CommandGroup
│ ├── CommandItem
│ └── CommandItem
├── CommandSeparator
└── CommandGroup
├── CommandItem
└── CommandItemBasic
A simple command menu in a dialog.
Shortcuts
Groups
A command menu with groups, icons and separators.
Scrollable
Scrollable command menu with multiple items.
API Reference
See the React Aria documentation for more information.