StealThis .dev

Input Variants

A complete set of text input styles — default, with prefix/suffix icons, floating label, input group with helper text, and validation states.

Open in Lab
css vanilla-js
Targets: JS HTML

Code

Input Variants

A complete input component system covering the most common UI patterns.

Variants

VariantDescription
DefaultLabel above, full-width
Icon prefixLeading icon inside input
Icon suffixTrailing icon / button
Floating labelLabel animates up on focus
Input groupLabel + input + helper text
Valid stateGreen border + check icon
Invalid stateRed border + error message
Character countLive counter (e.g. 48 / 200)
Password toggleShow/hide password button

Accessibility

All inputs have associated <label> elements. Error states use aria-describedby to link the error message.