Fieldset

A native fieldset element with an easily stylable legend.

Billing details

API reference

Import the component and assemble its parts:

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
className

string | (state) => string

undefined

render

| React.ReactElement
| (props, state) => React.ReactElement

undefined

Legend

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

PropTypeDefault
className

string | (state) => string

undefined

render

| React.ReactElement
| (props, state) => React.ReactElement

undefined