Capítulo 24 de 51
A two-part native-<fieldset>-equivalent for grouping multiple related controls (a radio group, a checkbox group, a multi-thumb slider) under one accessible legend, typically composed via render onto the actual group primitive (render={<RadioGroup />}).
Root → Legend — that's the whole component; grouping logic itself lives in whatever it wraps via render (RadioGroup, CheckboxGroup, Slider).<Fieldset.Root render={<RadioGroup />}><Fieldset.Legend>Storage type</Fieldset.Legend>...</Fieldset.Root> — Fieldset supplies the accessible group name; the wrapped component supplies the actual selection behavior (see ch009 Forms for the full worked pattern with Field.Item).| Part | Notable props | Notable data attributes |
|---|---|---|
Root | (composes via render) | — |
Legend | — | — |
Fieldset whenever a single label needs to apply to a group of controls rather than one control — a lone Field.Label only labels a single control.render, don't nest it as a separate DOM wrapper — that keeps the semantic <fieldset>/<legend> pairing intact instead of adding an extra non-semantic div.Fieldset.Root render={<X />} + Fieldset.Legend.