Back to Handbook
Implementation · Intermediate
Implementing Search
Find Anything
A dedicated guide to adding search functionality. Comparing Client-side vs Server-side search and implementing Command Palettes.
01
Client vs Server Search
Choose the right engine based on your data size.
| Feature | Client-Side (Fuse.js) | Server-Side (Algolia/Meili) |
|---|---|---|
| Scale | < 1000 items | Millions of items |
| Speed | Instant (In-memory) | Fast (Network req) |
| Cost | Free | Paid / Hosted |
| Complexity | Low | Medium |
02
The Command Palette (Cmd+K)
The gold standard for navigation. Users expect to jump anywhere with a keystroke.
- Library: Use 'cmdk' (by Pacocoursey) for a beautiful, unstyled accessible combobox.
- Prompt: 'Implement a global Command Menu using cmdk that opens on Cmd+K and allows navigation to all routes.'
- Vibe: Make it fast. Zero layout shift.