Skip to content

Form Field

A wrapper component that provides label, error message, and help text functionality with automatic ARIA correlation.

FormField is the glue that binds inputs, labels, and validation messages together in a way that screen readers can understand.

Accessibility Features

  • Auto-Described: Automatically sets aria-describedby for help text and error messages.
  • Error State: Manages aria-invalid based on validation state.

Usage Example

import { FormField, Input } from '@holmdigital/components'; <FormField label="Email Address" error="Valid email is required" helpText="We'll never share your email." > <Input type="email" placeholder="you@example.com" /> </FormField>