You are viewing a PR preview for PR #1506

Agriculture Design System
Beta
Design System for the Export Service

Fieldset

The Fieldset component is used to group related form fields and includes a descriptive legend to label the group, helping screen readers understand the relationship between these form fields.

View in StorybookView in Github
import { ... } from '@ag.ds-next/react/fieldset';

Usage

Fieldset components can be imported via the fieldset entrypoint in the @ag.ds-next/react package.

For example:

import { ... } from '@ag.ds-next/react/fieldset';

Props

Fieldset Props
PropTypeDescription
legendReactNodeDescribes the purpose of the group of fields.
children?ReactNode
hint?ReactNodeProvides extra information about the fieldset.
id?stringDefines an identifier (ID) which must be unique.
FieldsetLegend Props
PropTypeDescription
childrenReactNode

Source

You can view the full source code for this package on Github.