Componentes

Command

Paleta de comandos ou lista filtrável.

Sobreposições e menus

Carregando demonstração…

Código da demo
"use client";

import {
  Command,
  CommandEmpty,
  CommandGroup,
  CommandInput,
  CommandItem,
  CommandList,
  CommandSeparator,
  CommandShortcut,
} from "@/components/ui/command";

export function Demo() {
  return (
    <Command className="max-w-md rounded-md border border-border shadow-subtle">
      <CommandInput placeholder="Digite um comando..." />
      <CommandList>
        <CommandEmpty>Nenhum comando encontrado.</CommandEmpty>
        <CommandGroup heading="Sugestões">
          <CommandItem>
            Calendário
            <CommandShortcut>⌘C</CommandShortcut>
          </CommandItem>
          <CommandItem>
            Busca
            <CommandShortcut>⌘K</CommandShortcut>
          </CommandItem>
        </CommandGroup>
        <CommandSeparator />
        <CommandGroup heading="Configurações">
          <CommandItem>Perfil</CommandItem>
          <CommandItem>Tema</CommandItem>
        </CommandGroup>
      </CommandList>
    </Command>
  );
}
Acessibilidade
cmdk gerencia foco e filtragem; anuncie empty state.
Importar
import { Command, CommandInput, CommandList, CommandItem } from "@financeequity/ui/command"

Neste repositório:

import { Command, CommandInput, CommandList, CommandItem } from "@/components/ui/command"
Dependências
cmdk