Live demo
Click the button below to open the command palette. It has been pre-loaded with sample commands. Press Escape to dismiss it, or click on any command to execute it.
TIP
This documentation site uses Ctrl+Shift+K instead of the default Cmd+K to avoid conflicting with VitePress's own search shortcut. In your application you can configure any shortcut via the openShortcut prop.
On a phone
On a phone (below 672px, or a touch phone held sideways) the palette is a full-width sheet from the top edge instead of a card 15% down the screen. It is never taller than the visual viewport (--nb-vvh, falling back to 100dvh), so the results stay above the on-screen keyboard, and only the results scroll. Desktops are unchanged.
Search behavior
The command palette uses fuzzy matching with weighted scoring:
- Exact prefix matches score highest
- Word boundary matches (start of a word) score next
- Substring matches score proportionally
- Fuzzy character-by-character matches score lowest
The search matches against the command label, namespace, and optional keywords.