FormSection

A fieldset-based section for grouping related form fields with a header containing a title and description. Ideal for organizing long forms into logical groups.

Basic Form Section

Profile

Update your personal information.

<FormSection>
  <FormSectionHeader>
    <FormSectionTitle>Profile</FormSectionTitle>
    <FormSectionDescription>
      Update your personal information.
    </FormSectionDescription>
  </FormSectionHeader>
  <FormSectionContent>
    <Field>
      <FieldLabel>Display name</FieldLabel>
      <Input placeholder="Jane Doe" />
    </Field>
    <Field>
      <FieldLabel>Bio</FieldLabel>
      <Input placeholder="A short description about you" />
    </Field>
  </FormSectionContent>
</FormSection>

Grid Layout

Address

Enter your shipping address.

<FormSection>
  <FormSectionHeader>
    <FormSectionTitle>Address</FormSectionTitle>
    <FormSectionDescription>
      Enter your shipping address.
    </FormSectionDescription>
  </FormSectionHeader>
  <FormSectionContent layout="grid">
    <Field>
      <FieldLabel>City</FieldLabel>
      <Input placeholder="San Francisco" />
    </Field>
    <Field>
      <FieldLabel>State</FieldLabel>
      <Input placeholder="CA" />
    </Field>
  </FormSectionContent>
</FormSection>

API Reference

FormSection

PropTypeDefaultDescription
classNamestringAdditional CSS classes to apply to the fieldset element.
children
required
React.ReactNodeShould contain FormSectionHeader and FormSectionContent sub-components.

FormSectionHeader

PropTypeDefaultDescription
classNamestringAdditional CSS classes for the header container.
children
required
React.ReactNodeTitle and description elements for the section.

FormSectionTitle

PropTypeDefaultDescription
classNamestringAdditional CSS classes for the legend heading.
children
required
React.ReactNodeThe section title text.

FormSectionDescription

PropTypeDefaultDescription
classNamestringAdditional CSS classes for the description paragraph.
children
required
React.ReactNodeDescriptive text explaining the purpose of the section.

FormSectionContent

PropTypeDefaultDescription
layout"stack" | "grid""stack"Controls the layout of child fields. Stack arranges vertically, grid uses a two-column layout on medium screens.
classNamestringAdditional CSS classes for the content container.
children
required
React.ReactNodeThe form fields within this section.