Usage

The FormControl component is a wrapper that provides context for form inputs. Relying on the context provides high flexibility and ensures that the state always stays consistent across the children of the FormControl. This context is used by the following components:

  • FormLabel
  • FormHelperText
  • Input
  • InputLabel

Warning: You should only ever have one input-like component (Input, Select, etc.) inside a single FormControl. If you have multiple, the state logic will break.

Example

Accessibility

FormControl automatically handles accessibility attributes and provides proper labeling for screen readers. It ensures that form controls are properly associated with their labels and error states.

Learn More

Visit the Guidance tab for best practices and the Code tab for implementation details.