Skip to main content

Input

Single-line text input with built-in label, hint, error, and loading state.

Preview ยท Input

Codeโ€‹

<div class="vstack" style="max-width:380px">
<label>Email <input type="email" placeholder="name@company.com" /></label>
<div data-field>
<label>API Key <input type="text" placeholder="sk-..." /></label>
<span data-hint>Visible only once after generation.</span>
</div>
<div data-field="error">
<label>Password <input type="password" aria-invalid="true" /></label>
<span class="error">Must be at least 8 characters.</span>
</div>
</div>

Propsโ€‹

PropTypeDefaultDescription
labelstringโ€”Label text
errorstringโ€”Error message
hintstringโ€”Helper text
loadingbooleanfalseLoading state
disabledbooleanfalseDisabled

Accessibilityโ€‹

  • Label is always required โ€” every input must have an associated <label>
  • Error state sets aria-invalid="true" and links the error message via aria-describedby automatically
  • Focus ring uses --ring token, meets WCAG 2.1 AA contrast on all backgrounds
  • required prop adds aria-required="true" and a visible * marker
Version history

See the Changelog for version history and breaking changes.