Input
A text input that is either a bare control or an entire accessible field, depending on the props you pass.
Loading documentation…
Lowercase letters, numbers and dashes.
Input is pressed into the surface with an inset shadow and edged with a
1px ring. Focus thickens that ring to 1.5px and changes its colour rather than
adding a second halo — one ring, two states, no layout shift.
Pass label (or description or error) and you get the full
Field layout with its accessible wiring for free. Omit
them and you get a bare control for a custom layout — supply aria-label in
that case.
icon and iconEnd sit inside the control; prefix and suffix are flush
addons on its edges, on the recessed surface. An addon is part of the value
("https://"), an icon is a hint about it.
At least 8 characters.
The four control heights: 20, 26, 32 and 40px. base is the default, and it is
the height every other control in the library shares.
A disabled input drops to the recessed surface, because a field you cannot type into should not look like a field you can.
Textarea takes the same props plus autoResize;
NumberField is the numeric sibling, and
OtpField the one-time-code one.
Renders the full field layout — label, description, error, aria-describedby.
Muted helper text under the control.
A message, or { message, match } tied to the browser's ValidityState.
Adds the muted "Optional" marker to the label.
A right-aligned slot on the label row.
Control height. It defaults to base (32px).
Rendered inside the control, before the text.
Rendered inside the control, after the text.
A flush addon on the left edge, for example https://.
A flush addon on the right edge, for example .heyo.sh.
Class for the outer field wrapper, used only when a label, description or error is present.
Class for the control itself.
Forwarded to the <input>.
Every other <input> attribute — type, value, defaultValue, onChange,
required, minLength, autoComplete — is passed straight through.