Skip to contents

Fieldset

A native fieldset element with an easily stylable legend.

View as Markdown
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.

className
string | function
Description

CSS class applied to the element, or a function that returns a class based on the component’s state.

Type
style
React.CSSProperties | function
Name
Type
render
ReactElement | function
Name
Description

Allows you to replace the component’s HTML element with a different tag, or compose it with another component.

Accepts a ReactElement or a function that returns the element to render.

Type

Additional Types

Fieldset.Root.Props

Re-Export of Root props as FieldsetRootProps

Fieldset.Root.State

Legend

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

className
string | function
Description

CSS class applied to the element, or a function that returns a class based on the component’s state.

Type
style
React.CSSProperties | function
Name
Type
render
ReactElement | function
Name
Description

Allows you to replace the component’s HTML element with a different tag, or compose it with another component.

Accepts a ReactElement or a function that returns the element to render.

Type

Additional Types

Fieldset.Legend.Props

Re-Export of Legend props as FieldsetLegendProps

Fieldset.Legend.State