FormSection
v1.0.4Updated 28 Sept 2026Visual + semantic grouping of related FormField rows under a heading and optional description. Use for long forms with logical sections.
Preview
Live · 16 stories▸Why this is recommendedformsectiongroupfieldset+4
The default, out-of-the-box FormSection.
- ✓Multi-section settings pages
- ✓Long onboarding forms
- ✓A long form where the reader must see at a glance which sections still have empty required fields
- ✓Showing a section in red until it is complete and green once it is
- Heading + description
- Collapsible variant
- Divider between sections
- Two-column layout option
- Numbered step badge
- Progress status dot (pending / in progress / done)
- Required-field completeness: red until every required field is answered, green once they are, with the missing fields named
- Filled n/total readout, counting optional fields but never letting them block
- data-complete="yes|no" for tests, and `formSectionCompletion` exported so a submit button reads the same computation
- A section with nothing required is not painted at all
- i18n: labels prop overrides every built-in string; the filled count formats through LocaleProvider
- ✕Single-field inputs (use FormField alone)
Install
Ask your agent, or call the MCP tool directly. The resolved bundle is written into your project.
Usage
Tick variants in the left menu — each adds a tab with that variant’s real story source, the same code the preview above renders.
Props
titleSection heading
yesdescriptionSection description
—collapsibleRender collapsible
—stepNumbered circle badge before the title
—statusPROGRESS indicator — a dot beside the title. Not a validation state
—fieldsThe fields this section tracks ({ label, value, required?, filled? }). Only required ones decide the tint; all of them count in the n/total readout
—completionCompletion passed in directly, for a section whose "filled" counts repeatable rows or signatures. Wins over `fields`
—emphasisHow a completion state is shown. "frame" tints the whole section (the default once a state exists); "none" keeps the chip only
—variantFlush block, framed card, or padding-less embed
—columnsBody grid column count
—labelsOverride every built-in string (i18n)
—Every tonal component shares the same tone × emphasis API, so the pair looks identical across Button, Badge, Alert and more.