Form

A native form element with consolidated error handling.

API reference

Form is composed together with Field. Import the components and place them together:

Anatomy
import { Field } from '@base-ui-components/react/field';
import { Form } from '@base-ui-components/react/form';

<Form>
  <Field.Root>
    <Field.Label />
    <Field.Control />
    <Field.Error />
  </Field.Root>
</Form>
PropTypeDefault
classNamestring | (state) => stringundefined
errorsRecord<string, string | string[]>undefined
onClearErrors(errors) => voidundefined
render| React.ReactElement
| (props, state) => React.ReactElement
undefined