Axon 911 Frontend DocsAxon 911 Frontend Docs
Axon 911 Frontend Docs
    Loading navigation…
U
User
Switch to light mode
  1. Components
  2. Fieldset
  3. API and Development

Fieldset

API and Development

View SourceOpens in a new tabSubmit IssueOpens in a new tab
Import Fieldset, FieldsetLegendVisibility, FieldsetType from @prepared911/ui/fieldset.
Layout and copy
PropTypeDefaultNotes
legendLocalizedMessagerequiredAlways rendered in a legend.
legendVisibilityFieldsetLegendVisibilityVisibleHidden wraps copy in VisuallyHidden inside legend.
descriptionLocalizedMessage;Group helper; id joins aria-describedby.
errorLocalizedMessage;Group error; id joins aria-describedby. Sets aria-invalid only when type is RadioGroup.
disabledboolean;Native fieldset[disabled].
requiredboolean;A visible legend ends with Label's aria-hidden * marker. RadioGroup also sets aria-required="true" on the host.
typeFieldsetTypeGroupRadioGroup sets role="radiogroup".
classNamestring;Appended after generated classes.
refRef<HTMLFieldSetElement>;Host ref.
Omissions
No style, no role prop, no tabIndex, and no on* handlers. Other native fieldset attributes and data-* pass through and merge with generated ARIA ids where applicable. See FieldsetProps TSDoc in props.ts for the full typed surface.
Props
NameTypeDefaultDescription
legendLocalizedMessage—Required group name; always rendered in a legend.
aria-descriptionLocalizedMessage—Extended description for assistive tech.
aria-labelLocalizedMessage—Accessible name when the visible label is insufficient.
aria-placeholderLocalizedMessage—Hint for an empty control.
classNamestring—Classes appended after the generated classes. Put overrides in @layer chroma.overrides.
descriptionLocalizedMessage—Optional helper copy associated with the group through aria-describedby.
disabledboolean—Native group disable; descendants inherit disabled through fieldset[disabled].
errorLocalizedMessage—Optional error copy; when set, the group is aria-invalid and the error id is in aria-describedby.
legendVisibilityFieldsetLegendVisibility—When {@link FieldsetLegendVisibility.Hidden}, legend copy is wrapped in VisuallyHidden inside the legend. Defaults to {@link FieldsetLegendVisibility.Visible}.
refRef<HTMLFieldSetElement>—Ref to the rendered fieldset.
requiredboolean—When true, a visible legend ends with Label's decorative, aria-hidden required marker. With {@link FieldsetType.RadioGroup} the host also gets aria-required="true"; the controls carry native required themselves.
titleLocalizedMessage—Native tooltip; accessibility hint, not visible UI title text.
typeFieldsetType—Grouping semantics. Defaults to {@link FieldsetType.Group}. {@link FieldsetType.RadioGroup} sets role="radiogroup" on the host.
Storybook
Interactive examples and edge cases for this component are in Storybook.
DefaultOpens in a new tab
Previous
Fieldset / Usage
Next
Fieldset / Accessibility
On this page
Layout and copy
Omissions
Props
Storybook