Patterns
SearchModal
โK command palette search modal with categories, keyboard navigation, and results.
Quick Preview
Installation
npm install lucide-react
// Copy component fromsrc/components/patterns/SearchModal.tsx
Usage
import SearchModal from '@/components/patterns/SearchModal'// โK command palette โ renders inline in the demo, typically in a portal<SearchModal />
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 |
|---|---|---|---|
results | SearchResult[] | - | Search result items |
placeholder | string | - | Input placeholder |
onSearch | (query: string) => void | - | Search input callback |
className | string | - | Additional CSS classes |