Fieldset
A native fieldset element with an easily stylable legend.
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
- Name
- 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>. Spreadpropsonto 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>. Spreadpropsonto 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.