Fieldset

A native fieldset element with an easily stylable legend.

Billing details

Anatomy

Import the component and assemble its parts:

Anatomy

API reference

Root

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

PropTypeDefault
className

| string
| ((state: Fieldset.Root.State) => string)

undefined

render

| ReactElement
| ((props: HTMLProps, state: Fieldset.Root.State) => ReactElement)

undefined

Legend

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

PropTypeDefault
className

| string
| ((state: Fieldset.Legend.State) => string)

undefined

render

| ReactElement
| ((props: HTMLProps, state: Fieldset.Legend.State) => ReactElement)

undefined