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

The foundation for building custom-styled fieldsets.

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

Legend

Renders an element that labels the fieldset.

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