Skip to contents

Fieldset

A native fieldset element with an easily stylable legend.

Billing details

Anatomy

Import the component and assemble its parts:

API reference

Root

Groups a shared legend with related controls. Renders a <fieldset> element.

disabled boolean | null false
Description

Whether the fieldset should ignore user interaction.

Type
boolean | null
Default
false
render Snippet<[props: HTMLFieldsetAttributes, state: FieldsetRootState, children: Snippet | undefined]> โ€”
Name
Description

Replace the default <fieldset>. Spread props onto the host element.

Type
Snippet<[props: HTMLFieldsetAttributes, state: FieldsetRootState, children: Snippet | undefined]>
disabled boolean
Name
disabled
Description

Whether the fieldset should ignore user interaction.

Type
boolean

Legend

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

render Snippet<[props: HTMLAttributes<HTMLDivElement>, state: FieldsetLegendState, children: Snippet | undefined]> โ€”
Name
Description

Replace the default <div>. Spread props onto the host element.

Type
Snippet<[props: HTMLAttributes<HTMLDivElement>, state: FieldsetLegendState, children: Snippet | undefined]>
disabled boolean
Name
disabled
Description

Whether the fieldset should ignore user interaction.

Type
boolean
data-disabled
Present when the fieldset is disabled.