Fieldset

An accessible fieldset wrapper with a visible legend label. Groups related form fields together with semantic HTML.

Basic Fieldset

Personal Information
<Fieldset legend="Personal Information">
  <Field>
    <FieldLabel>First name</FieldLabel>
    <Input placeholder="Jane" />
  </Field>
  <Field>
    <FieldLabel>Last name</FieldLabel>
    <Input placeholder="Doe" />
  </Field>
</Fieldset>

Disabled Fieldset

Account Details
<Fieldset legend="Account Details" disabled>
  <Field>
    <FieldLabel>Username</FieldLabel>
    <Input placeholder="janedoe" />
  </Field>
  <Field>
    <FieldLabel>Email</FieldLabel>
    <Input type="email" placeholder="jane@example.com" />
  </Field>
</Fieldset>

API Reference

PropTypeDefaultDescription
legend
required
stringText displayed as the fieldset legend, providing an accessible group label.
disabledbooleanfalseWhen true, disables all form controls within the fieldset.
classNamestringAdditional CSS classes to apply to the fieldset element.
children
required
React.ReactNodeThe form fields and content grouped by this fieldset.