Skip to content

Input

Text inputs with labels, validation states, helper text, and icon support.

Basic

A simple input with a label and placeholder.

Sizes

Inputs come in sm, md, and lg sizes.

Validation

Inputs with error messages and helper text.

Must be 3-20 characters, no spaces.

With Icons

Inputs can include a leading icon for context.

Interactive

A controlled input with live value display and toggles for error and disabled states.

Current value: (empty)
PropTypeDefaultDescription
labelstringLabel text displayed above the input.
placeholderstringPlaceholder text shown when the input is empty.
errorstringError message. When set, the input is styled as invalid.
helperTextstringHint text displayed below the input.
inputSize"sm" | "md" | "lg""md"Controls the height and font size of the input.
iconLeftReactNodeIcon rendered inside the input on the left.
disabledbooleanfalsePrevents interaction when true.
fullWidthbooleanfalseStretches the input to fill its container.

Related Components

Best Practices

✅ Do

  • Always include a visible label
  • Show validation feedback inline
  • Use placeholder text as hints not labels
  • Use the correct input type (email, password, etc.)

❌ Don't

  • Use placeholder as the only label
  • Show errors before user interaction
  • Auto-clear fields on validation error
  • Make required fields unmarked

Accessibility

FeatureSupport
Label associationVia htmlFor/id pairing
aria-requiredMarks required fields for assistive technologies
aria-invalid + aria-describedbyLinks error messages to the input for screen readers
autocomplete attributeSupports browser autofill for common fields