Input

Text input field with optional label, hint, and error state

Category: inputs · WCAG 2.2-AA · form, text, input

Sizes

States

Props

PropTypeDefaultDescription
labelstringText label for the control (standalone use). Omit it when wrapping the Input in a Field — the Field owns the label, and setting both double-labels the control.
hintstringSupplementary hint text shown with the control.
errorstringError message shown when the value is invalid.
size'sm' | 'md' | 'lg'mdVisual size of the component (e.g. 'sm', 'md', 'lg').
placeholderstringPlaceholder text shown when the field is empty.
disabledbooleanfalseWhen true, disables the control and removes it from the tab order.

Design tokens

When to use

When not to use

How to build an accessible Input in React →

Examples

With label

<Input label="Email" placeholder="[email protected]" />

With error

<Input label="Email" error="Invalid email address" />

Related components

← Back to docs