EDS4 logo
@eds/react/fieldset
v0.0.0

Fieldset

Form component to group thematically related form fields together.
Prop
Required
Description
Type
legend
✅

Provide a short caption that describes the set of form fields. @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/legend

string
children
✅

The form fields that the set consists of.

string | number | false | true | ReactElement<any, string | JSXElementConstructor<any>> | ReactPortal | { key?: string | number; ref?: null; props?: { children?: boolean | ReactChild | ReactPortal | StrictReactFragment; }; } | (boolean | ReactChild | ReactPortal | StrictReactFragment)[]
legendStyle
—

Control the legend style; font size and spacing. Defaults to section.

"section" | "group" | "field"
description
—

Provide a description if necessary. NOTE: This description will be rendered inside the <legend>-element.

string
disabled
—

Control whether the descendant form controls (i.e. not including the legend) are disabled. Defaults to false.

boolean
legendVisible
—

Visually hide the legend from view, but still accessible to screen readers. Defaults to true.

boolean
removeSpaceForLastFieldMessage
—

Visually removes a space.large from the Fieldset's bottom (using negative margin), in order to create a balanced vertical rhythm when stacking multiple Fieldsets. Defaults to false.

boolean
required
—

Indicate whether a value is required in the fieldset's inputs.

boolean
heading
—

Optional heading configuration for the fieldset's legend.

{ as?: ElementType; level: 1 | 2 | 3 | 4 | 5 | 6; }