Fieldset

Example

Legend Caption

Variants

Basic

white
Legend Caption

Visually hidden legend caption

white
Hidden Legend Caption

Props

<Fieldset />
PropTypeDefaultDescription
* legend
string
Required `<legend />` for fieldset
hideLegend
bool
Visually hidden `<legend />` for fieldset

Accessibility

Fieldsets group inputs into logic parts of a form. A screenreader usually announces the filedset legend along with the label of each nested input, which helps users stay in context when tabbing through different inputs within a fieldset. For example a color switch would consist of radio buttons wrapped in a fieldset, with a legend reading "Color". A screenreader would then read each input's label prefixed with the legend contnets (e.g. Color blue, color red, color green...).

Lighter

    v1.0.0