Fieldset

A native fieldset element with an easily stylable legend.

Billing details

API reference

Import the component and place its parts the following way:

Anatomy
import { Fieldset } from '@base-ui-components/react/fieldset';

<Fieldset.Root>
  <Fieldset.Legend />
</Fieldset.Root>

Root

Groups the fieldset legend and the associated fields. Renders a <fieldset> element.

PropTypeDefault
classNamestring | (state) => stringundefined
render| React.ReactElement
| (props, state) => React.ReactElement
undefined

Legend

An accessible label that is automatically associated with the fieldset. Renders a <div> element.

PropTypeDefault
classNamestring | (state) => stringundefined
render| React.ReactElement
| (props, state) => React.ReactElement
undefined