sigilUI

Command

Build a searchable command list with keyboard navigation.

@sigil-ui/componentsReact

Preview

Live preview Interactive

Import

import { Command, CommandInput, CommandList, CommandEmpty, CommandGroup, CommandItem, CommandSeparator, CommandDialog } from "@sigil-ui/components";

Usage

<Command className="border border-[var(--s-border)]">
  <CommandInput placeholder="Type a command..." />
  <CommandList>
    <CommandEmpty>No results.</CommandEmpty>
    <CommandGroup heading="Suggestions">
      <CommandItem>Calendar</CommandItem>
      <CommandItem>Search</CommandItem>
      <CommandItem>Settings</CommandItem>
    </CommandGroup>
  </CommandList>
</Command>

Sub-components

This component includes the following parts:

  • <CommandInput>
  • <CommandList>
  • <CommandEmpty>
  • <CommandGroup>
  • <CommandItem>
  • <CommandSeparator>
  • <CommandDialog>

Token integration

CSS VariablePurpose
--s-card-radiusCard radius
--s-backgroundBackground
--s-textText
--s-border-styleBorder style
--s-borderBorder
--s-text-mutedText muted
--s-radius-smRadius sm
--s-surfaceSurface