No results found.
Calendar
Search Emoji
Launch
Profile⌘P
Settings⌘S
Installation
pnpm add @viliha/vui-uiThen import from @viliha/vui-ui/command.
Usage
Built on `cmdk`. Type to filter items across groups.
command-demo.tsx
import {
Command, CommandInput, CommandList, CommandEmpty,
CommandGroup, CommandItem, CommandSeparator, CommandShortcut,
} from "@viliha/vui-ui/command";
export function Example() {
return (
<Command className="rounded-lg border">
<CommandInput placeholder="Type a command or search..." />
<CommandList>
<CommandEmpty>No results found.</CommandEmpty>
<CommandGroup heading="Suggestions">
<CommandItem>Calendar</CommandItem>
<CommandItem>Search Emoji</CommandItem>
</CommandGroup>
</CommandList>
</Command>
);
}Command in a dialog
For a modal ⌘K command menu, use VUI's
command-palette (it wraps this in an overlay). The command primitive here is the inline menu.