Skip to content
Navigation

CommandBar

A Ctrl / Cmd + K palette. Type to filter, arrow keys move a gliding highlight, Enter goes, Esc closes.

Download
  • React
  • Tailwind CSS v4
  • motion

Props

NameTypeDefaultWhat it does
items{ label, href?, group?, hint?, icon?, keywords? }[]—Commands. group = heading; hint = text on the right; keywords = extra search words.
onSelect(item) => void—Called when a command is picked. Leave out to open item.href.
hotkeystring | false"k"Letter that opens it with Ctrl / Cmd. false = no shortcut.
placeholderstring"Search or jump to…"Search box hint.
containedbooleanfalseKeep the dialog inside the nearest relative parent, not the whole screen.
triggerReactNode"Search"Text on the open button.
triggerClassNamestringglass buttonOpen button look.
accentstring"#a78bfa"Highlight bar colour.
labelstring"Command bar"Name read out by screen readers.
classNamestringdark glass panelDialog look.