Command
Command menu component built with cmdk. Perfect for creating command palettes and searchable lists.
Installation
# Install @opencosmos/ui to use Command
pnpm add @opencosmos/uiPreview
Loading preview...
Usage
Import
import { Command } from '@opencosmos/ui';Example
<Command>
Content
</Command>Eject
Copy this component into your project for full customization
Code Examples
Basic Command Menu
Command palette with search and grouped items
import {
Command,
CommandInput,
CommandList,
CommandEmpty,
CommandGroup,
CommandItem,
CommandSeparator,
} from "@opencosmos/ui"
<Command className="rounded-lg border shadow-md">
<CommandInput placeholder="Type a command..." />
<CommandList>
<CommandEmpty>No results found.</CommandEmpty>
<CommandGroup heading="Suggestions">
<CommandItem>Calendar</CommandItem>
<CommandItem>Search Emoji</CommandItem>
</CommandGroup>
</CommandList>
</Command>