Command Palette
A ⌘K-style command palette with spring-animated entrance, filtered search, and keyboard navigation
What we're building
The Command Palette example shows a ⌘K-style command palette - the kind you'd find in VS Code or Linear. Clicking the search trigger (or imagining a keyboard shortcut) opens a modal dialog where you can filter commands, navigate with the arrow keys, and select an item to close the palette.
The animations lean on several Motion APIs:
AnimatePresenceto animate the backdrop and dialog in and out- The
animate,initial, andexitprops onmotioncomponents for enter/exit transitions - The
layoutprop to smoothly reflow groups as the filter changes - The
layoutIdprop for the selection highlight, which animates between items as you navigate
