Fieldset API

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

Props

PropTypeDescriptionDefault
childrenReact.ReactNodeThe form elements to be grouped together, such as Field, Checkbox, Radio or TextInput._
description?React.ReactNodeAdditional text that appears below the legend to provide context or instructions for the entire group of form controls._
id?stringA unique identifier for the fieldset, useful for form accessibility and targeting with CSS or JavaScript._
isDisabled?booleanWhen set to true, disables all form controls within the fieldset, preventing user interaction and applying a disabled visual style.false
isRequired?booleanWhether user input is required on the input before form submission.false
legendReact.ReactNodeThe title or heading for the fieldset that clearly identifies the purpose of the grouped form controls._
errorMessage?React.ReactNodeText 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'