Skip to content

DocsFormsText field

PT

Forms

Text field

Input with the label on top, tile background and visible focus.

CSS only

Example

Installation

Text field 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-fieldThe label that wraps label text and input, in a grid with 8px between them.
u-inputThe input: 40px tall, fills the field's width.

Accessibility and keyboard

State and roles

WhereAttributeWhat it says
labelwrapping the inputThe label text becomes the field's name, no id needed.
:focus-visibleon u-input2px outline in the text color.

Keyboard

KeyDoes
Tabfocuses the field

Type to search. Arrows pick, Enter opens.