Skip to content

DocsFormsSearch

PT

Forms

Search

Pill-shaped search field with an icon and a keyboard shortcut beside it.

CSS only

Example

Installation

Search ships in the full package, in unslop.css:

curl -fsSL unslop.leallabs.dev/i | sh

No build It's just CSS: with unslop.css on the page, the classes already work.

Classes and variants

ClassWhat it does
u-searchThe pill label. It gets a tile background when the input has focus.
u-kbdShortcut key, in a mono font. Also works on its own inside text.

Accessibility and keyboard

State and roles

WhereAttributeWhat it says
aria-labelon the inputRequired: the placeholder is not a name.
kbdnative elementIt only shows the shortcut. Wiring the shortcut is up to your code.

Keyboard

KeyDoes
Tabfocuses the field

Type to search. Arrows pick, Enter opens.