jatui

CommandPalette

App-wide Ctrl-K command palette with fuzzy search, grouped results, recents, and keyboard nav

Command Palette

Press Ctrl + K anywhere on this page (or click the button below) to open the command palette. Type to fuzzy-search across labels and keywords. Use ↑↓ to navigate, Tab to jump between groups, Enter to run, Esc to close.

Features

  • Fuzzy search across label + keywords with sequential bonus scoring
  • Grouped results — Tab/Shift+Tab jump between groups
  • Recent commands (localStorage) appear first when no query typed
  • Shortcut hints rendered as kbd elements
  • ARIA combobox/listbox pattern — screen-reader accessible
  • Zero new dependencies — built on jatui motion tokens
  • Ctrl+K toggle, Escape close, backdrop click to dismiss

Store API

import { commandPalette } from 'jatui'

// Register commands (can call multiple times per group)
commandPalette.registerCommands('Navigation', [
  {
    id: 'nav-home',
    label: 'Go to Home',
    icon: '🏠',
    keywords: ['home', 'dashboard'],
    shortcut: ['G', 'H'],
    action: () => router.push('/')
  }
])

// Open / close programmatically
commandPalette.openPalette()
commandPalette.closePalette()