Skip to content
HomeCobalt

Command palette

Jumps to any record or runs any command from one search field, opened from anywhere with Command K or Control K.

Examples

Command K opens it with recent records first, then advisers, funds and commands that narrow as you type, with the typed words marked.

Nothing opened yet.

Server searchSearch on a server that waits for two letters and a pause in typing, keeps the last results, and dims them only past 250ms.

Nobody opened yet.

Failed searchWhen the search fails, the window says so where the results were and offers Retry; the text you typed stays.
In a sectionOpened from a section's controls with a Button, so the palette searches what the section lists.

Your stays

  • Harbour loftLisbon
  • Pine cabinBergen
  • Garden flatPorto
  • Canal studioAmsterdam

Usage

Use it when

  • A research or admin tool where people jump to a known record by name, from any page.
  • A keyboard-first tool with commands worth reaching without the pointer.

Use something else when

  • Picking a value in a form. Use Combobox instead.
  • Filtering the list on the page. Use InputGroup instead, as a search box over the list.
  • A few commands for one thing. Use DropdownMenu instead.

Rules

General

Content

Avoid

Limits

Install

npx shadcn@latest add https://kaanarici.com/r/cobalt/command-palette.json
import { CommandPalette, CommandPaletteTrigger, CommandPaletteContent, CommandPaletteInput, CommandPaletteList, CommandPaletteGroup, CommandPaletteGroupLabel, CommandPaletteCollection, CommandPaletteItem, CommandPaletteItemDescription, CommandPaletteItemHint, CommandPaletteMatch, CommandPaletteEmpty, CommandPaletteStatus, CommandPaletteFooter, CommandPaletteShortcutHint } from "@/components/cobalt/ui/command-palette"