Command
Type to jump anywhere — places, actions, pages (cmdk).
Preview
Nothing here. Try a place.
ManaliHimachal Pradesh
RishikeshUttarakhand
GoaGoa
JaipurRajasthan
PokharaNepal
My stays⌘B
Map⌘M
Talk to a local
Usage
tsx
import { Command, CommandInput, CommandList, CommandEmpty, CommandGroup, CommandItem, CommandSeparator, CommandShortcut, PlaceIcon } from "zostel-ui";
<Command className="rounded-xl border border-zostel-beige">
<CommandInput placeholder="Type a place or an action…" />
<CommandList>
<CommandEmpty>Nothing here. Try a place.</CommandEmpty>
<CommandGroup heading="Places">
<CommandItem value="Manali Himachal Pradesh" onSelect={go}>
<PlaceIcon slug="manali" variant="mono" color="currentColor" size={16} />
Manali
</CommandItem>
</CommandGroup>
</CommandList>
</Command>
{/* as a ⌘K palette: <CommandDialog open={open} onOpenChange={setOpen}>…</CommandDialog> */}Parts
| Prop | Type | Default | Description |
|---|---|---|---|
Command | cmdk root | — | Filters items as you type. |
CommandDialog | { open, onOpenChange } | — | The same, in a Dialog. |
CommandItem | { value?, onSelect?, disabled? } | — | value is what the search matches. |
CommandGroup | { heading } | — | A titled group. |
CommandEmpty / Separator / Shortcut | | — | Structure. |
CommandType:
cmdk rootDefault: —
Filters items as you type.
CommandDialogType:
{ open, onOpenChange }Default: —
The same, in a Dialog.
CommandItemType:
{ value?, onSelect?, disabled? }Default: —
value is what the search matches.
CommandGroupType:
{ heading }Default: —
A titled group.
CommandEmpty / Separator / ShortcutType:
Default: —
Structure.