Command

overlays

Fast, composable command menu component built on cmdk.

Preview

Installation

npm install @launchapp/design-system
Import
import {  Command, CommandInput, CommandList, CommandEmpty,  CommandGroup, CommandItem, CommandSeparator, CommandShortcut} from "@launchapp/design-system";

Examples

Command Palette

<Command className="rounded-lg border shadow-md">  <CommandInput placeholder="Type a command or search..." />  <CommandList>    <CommandEmpty>No results found.</CommandEmpty>    <CommandGroup heading="Suggestions">      <CommandItem>Calendar</CommandItem>      <CommandItem>Search</CommandItem>    </CommandGroup>    <CommandSeparator />    <CommandGroup heading="Settings">      <CommandItem>        Profile        <CommandShortcut>⌘P</CommandShortcut>      </CommandItem>    </CommandGroup>  </CommandList></Command>

Props

PropTypeDefaultDescription
value
stringControlled selected value.
onValueChange
(value: string) => voidCallback when selection changes.
filter
(value: string, search: string) => numberCustom filter function.
shouldFilter
booleantrueWhether to filter items based on search.