vert-ui
Browse docs
All components

Input

Single-line text field with validation state, focus ring and file/placeholder support.

Preview

Live preview

Found in workspace settings.

Usage

Examples

Invalid state

Enter a valid email address.

<Input invalid aria-label="Email" placeholder="you@example.com" />
<p className="text-xs font-medium text-destructive">
  Enter a valid email address.
</p>

With label and hint

Visible to everyone in the org.

<div className="space-y-2">
  <Label htmlFor="workspace">Workspace name</Label>
  <Input id="workspace" placeholder="Acme Inc" />
  <p className="text-xs text-muted-foreground">Visible to everyone in the org.</p>
</div>

Disabled and read-only sizing

<Input disabled value="Locked field" readOnly aria-label="Field" />
<Input className="h-11 px-4 text-base" aria-label="Large input" />

Reference

Props

PropTypeDefaultDescription
invalidboolean—Marks the field invalid: sets aria-invalid, data-invalid and the destructive border.
typestring"text"Native input type — email, password, search, number…
placeholderstring—Hint shown while empty. Not a substitute for a label.
disabledboolean—Native disabled state — dimmed, skipped by tab and pointer.
requiredboolean—Native required flag: browser validation plus SR announcement.
…native input attrsInputHTMLAttributes<HTMLInputElement>—value, onChange, autoComplete, minLength, inputMode, …

Accessibility

Accessibility notes

  • Every input needs a programmatic name: pair it with Label htmlFor (or use Field, which wires it for you).
  • invalid flips aria-invalid — screen readers announce the state on focus; keep an inline error text linked by aria-describedby (Field does this automatically).
  • Placeholders vanish on typing and often fail contrast — keep them for examples, labels for real forms.
  • Native required works with browser validation; a visual asterisk alone is not enough.