compacto-ui

Search documentation

Jump to a page or a component.

Command

Filterable command list; wrap in CommandDialog for a palette.

peer: cmdk

Preview

Installation

No install — ask an AI agent to copy this component from registry.json, then pnpm add cmdk.

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

Notes

  • Optional peer: cmdk. Installing it is only required if you import this module.
  • CommandDialog's title and description are visually hidden — a palette is self-evident to anyone who can see it and needs a name for anyone who cannot.
  • The list caps at 300px and scrolls rather than growing.
  • This documentation site's own ⌘K search is a CommandDialog.

Props

The props worth knowing. Everything else passes straight through to the underlying element, including className, which is merged last so it always wins.

PropTypeDefaultDescription
title (CommandDialog)string"Command Palette"Accessible name for the dialog.
description (CommandDialog)string"Search for a command to run..."Accessible description for the dialog.