A command palette component for searchable command lists.
npx shadcn@latest add @preskok/commandimport {
Command,
CommandEmpty,
CommandGroup,
CommandInput,
CommandItem,
CommandList,
} from "@/components/ui/preskok-ui/command"
export function CommandDemo() {
return (
<Command>
<CommandInput placeholder="Type a command..." />
<CommandList>
<CommandEmpty>No results found.</CommandEmpty>
<CommandGroup heading="Suggestions">
<CommandItem>Calendar</CommandItem>
<CommandItem>Search Emoji</CommandItem>
</CommandGroup>
</CommandList>
</Command>
)
}The root command component that manages state and keyboard navigation.
Search input for filtering command items.
Container for command groups and items.
Displayed when no results match the search query.
Groups related command items together with an optional heading.
Individual selectable command option.
Visual separator between command groups.