An accessible fieldset component that groups related form controls with a legend and optional help text. Uses the Label component with tagName="legend" for consistent styling and HelpText for accessible descriptions via aria-describedby.
| Name | Type | Description | ||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
props | object | Component props. Properties
| ||||||||||||||||||||||||||||||||||||
ref | object | | Ref to the component. |
- Since
- 6.1.0
- Source
The Fieldset component.
- Type:
- JSX.
Element
import Fieldset from '@gravityforms/components/react/admin/modules/Fieldset';
return (
<Fieldset
legendAttributes={ { label: 'Contact Information' } }
helpTextAttributes={ { content: 'Please fill out all required fields.' } }
>
<Input label="First Name" />
<Input label="Last Name" />
</Fieldset>
);