Variants
Sizes and states, built from the same markup (the beam only follows the main demo).
Usage
Paste the markup, include assets/css/tokens.css and assets/css/tailwind.css, then run the script from this page.
Accessibility
- Combobox pattern. The input is role="combobox" with aria-controls, aria-expanded and aria-activedescendant pointing at the highlighted role="option" in a listbox, as in cmdk and Radix.
- Keyboard. Type to filter, Up/Down/Home/End move the highlight, Enter opens the result, Escape clears the query. The torch follows the same highlight as the mouse.
- Announcements. The footer is a polite live region: it reads the result count and "Opened ..." when a result is picked.
- Reduced motion. With prefers-reduced-motion the torch jumps to the highlighted row with no spring, the drawer snaps instead of sliding and the burst is skipped.