Input

A single-line text field — with optional in-field leading/trailing slots and built-in clear, password-reveal, and loading affordances.

Stablev0.3.0@garn/ui/input

Default

Default text input.

Appearance

The shared field-surface fill axis (see lib/field-variants.ts): outline = a semi-transparent neutral border on a transparent fill (the default); soft = a subtle neutral fill with no edge that clears to the full outline on focus; ghost = seamless (no fill / edge) until focus — for inline / table-cell fields.

Outline

outline

Soft

soft

Ghost

ghost

Sizing

Control height rung off the locked --garn-control-* ladder (24·28·32·40·44px at default density).

xs
sm
md
lg
xl

Spacing

The same control rendered across garn's density modes — compact, default, and spacious.

Compact
Default
Spacious

States

Interactive states, toggled live.

usage
<Input />

State

Labeled

Input with an associated label.

Slots

Leading icon, trailing unit, and an interactive trailing control.

.com

Clearable

A clear button (Escape clears, focus retained).

Password

A password field with a reveal toggle.

Your password is hidden

Loading

A spinner, and a cancellable loading field.

Invalid

aria-invalid — danger edge + auto error glyph.