EDS4 logo
@eds/fieldset
v4.1.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"
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
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
heading

Optional heading configuration for the fieldset's legend.

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