Component docs

Input

Single-line text field with built-in label, hint and error wiring.

When to use

  • Always pass `label`; placeholder is never a substitute.
  • Use `hint` for format guidance and `error` for validation failures.
  • Pick the native `type` (email, tel, number) so mobile keyboards match.

Playground

Change props on the right; the preview and code update instantly.

We only use this for notifications.

Props
<Input label="Work email" placeholder="ada@veraforge.co" hint="We only use this for notifications." size="md" />

Props

PropTypeDefaultDescription
labelstring—Visible label, wired with htmlFor.
hintstring—Helper text linked via aria-describedby.
errorstring—Error message; sets aria-invalid and aria-errormessage.
sizesm | md | lgmdField scale.
startAdornmentReactNode—Content before the text (e.g. icon).
endAdornmentReactNode—Content after the text (e.g. unit).
requiredbooleanfalseNative required plus a visual marker.
disabledbooleanfalseNative disabled state.
containerClassNamestring—Class for the outer field wrapper.

Keyboard navigation

KeysBehavior
Tab / Shift+TabMove focus into / out of the field.
Text keysEdit the value; native shortcuts (select all, undo) work.
Clicking the labelFocuses the field.

ARIA attributes

AttributeGuidance
aria-describedbySet automatically to link hint and error text.
aria-invalidSet automatically when `error` is present.
aria-errormessagePoints to the role="alert" error message.
aria-labelOnly when a visible label is truly impossible (e.g. search in a toolbar).

Theme tokens

Every part of Input reads from these tokens, so it re-themes in light and dark automatically.

PartTokens
Shell
--surface-raised--border-strong--radius-md--border-width
Shell (focus)
--primary--primary-subtle--halo-width
Shell (error)
--destructive--destructive-subtle
Shell (disabled)
--muted--opacity-disabled-field
Text & placeholder
--foreground--muted-foreground--text-sm--text-body--text-lg
Label, hint, error
--weight-medium--text-caption--destructive
Spacing
--space-2--space-3--space-4--space-5

Accessibility checklist

0 of 7 verified

Focus
Contrast
Target size
Keyboard
Screen reader

Check contrast numbers live on the Accessibility page.