Navigation
CommandBar
Keyboard-first command palette β search, navigate, and trigger actions with ββ and Enter.
Quick Preview
ββ Navigateβ΅ SelectEsc Close
Installation
// Copy fromsrc/components/navigation/CommandBar.tsx// Dependenciesnpm install lucide-react
Usage
import CommandBar from '@/components/navigation/CommandBar'const items = [{ icon: 'π ', label: 'Home', href: '/', category: 'Pages' },{ icon: 'β‘', label: 'Animations', href: '/components/animations', category: 'Components' },{ icon: 'βοΈ', label: 'Toggle Theme', category: 'Actions', shortcut: ['β', 'T'] },]export default function App() {return <CommandBar items={items} placeholder="Search commandsβ¦" />}
Examples
Components only
Filtered to a single category
ββ Navigateβ΅ SelectEsc Close
Keyboard shortcuts
Items with shortcut badges visible at a glance
ββ Navigateβ΅ SelectEsc Close
Prompt Preview
Copy a prompt that recreates this UI
Paste this into your AI coding assistant to generate code that closely matches the reference, including color, size, shape, typography, spacing, and polish.
Copy-ready AI prompt
Starts from the current visual reference and project constraints.
Tweak only product-specific copy or data after the first generation pass.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
items* | CommandBarItem[] | - | Array of {icon?, label, href?, category?, shortcut?, onSelect?} |
placeholder | string | 'Search commandsβ¦' | Input placeholder |