Fieldset API

API reference docs for theFieldsetcomponent. For examples and details on the usage of this component, visit the component demo page.

Props

Prop

Type

Description

Default

children

React.ReactNode

The form elements to be grouped together, such as Field, Checkbox, Radio or TextInput.

_

description?

React.ReactNode

Additional text that appears below the legend to provide context or instructions for the entire group of form controls.

_

id?

string

A unique identifier for the fieldset, useful for form accessibility and targeting with CSS or JavaScript.

_

isDisabled?

boolean

When set to true, disables all form controls within the fieldset, preventing user interaction and applying a disabled visual style.

false

isRequired?

boolean

Whether user input is required on the input before form submission.

false

legend

React.ReactNode

The title or heading for the fieldset that clearly identifies the purpose of the grouped form controls.

_

errorMessage?

React.ReactNode

Text displayed when validation fails, highlighting what needs to be corrected. Adds visual error styling and announces the error to screen readers.

_

orientation?

'horizontal' | 'vertical'

Controls the layout direction of the form elements within the fieldset - either side-by-side (horizontal) or stacked (vertical).

'vertical'