Command
A search palette over the page. Type to filter, move with the arrow keys or the pointer, and press Enter to choose. It is this site's search.
Or press ⌘K anywhere for the site’s own search.
Installation
$npx shadcn@latest add @stillui-pro/commandA paid component. The command needs the token from your account in STILLUI_TOKEN; your account page shows the one-time setup.
This is a paid component. Its source and install come with access.
States
- Shortcut
- ⌘K on a Mac, Ctrl+K elsewhere, opens and closes it from anywhere on the page. Pass hotkey={null} to leave the shortcut to someone else.
- Search
- Every word typed must appear in the name, description or hidden keywords. Names that start with the query come first, the group with the best match moves to the top, and the matching part is underlined.
- Highlight
- One surface follows the arrow keys and the pointer, sliding between rows. Moving the pointer moves it; scrolling under a still pointer doesn't.
- Keyboard
- Focus stays in the search field. Up and down wrap round the list, Enter chooses, and Escape closes.
- Nothing found
- Says what was searched for, instead of an empty box.
- Closing
- Escape, the backdrop or a choice closes it. Focus returns to whatever opened it, and the search starts empty next time.
- Screen readers
- A combobox over a listbox, with the highlighted row as its active descendant, and groups named by their headings.
- Page behind
- The page stops scrolling while the palette is open.
- Reduced motion
- It fades in and out without scaling, and the highlight jumps.
Notes
It renders into document.body, so a parent with a transform or backdrop filter can't trap it.
You choose what a pick does with onSelect: navigate, run an action or fill a field.