Overview
Reference usage
Groups related form fields under a heading with optional description and layout control.
Usage
Heading note
meta puts a short muted note beside the heading on its baseline ("Read with every chat", "3 of 9"). It is outside the heading element, so the heading's accessible name stays the heading text; in a fieldset the note sits inside the legend after the text. Use description for a sentence of guidance. When that sentence holds markup, such as a file name in code, pass descriptionContent instead: the snippet is drawn inside the same description paragraph, in the same style, in place of description.
Grouped sections
grouped draws the children as one card with a divider between them, on the GroupedList's surface (the raised fill, no border, the surface radius, a 16px inset), under its heading and description. The heading steps with headingLevel as a Section title does: large at level 2, the base size at level 3, smaller and muted below that. It is the frame of a settings page: each child is a SettingRow, and a grouped section is always one column whatever columns says.
A section with no children draws its heading and description alone, for a list that has nothing in it yet and says so in the page's own words beneath, with no empty card.
Account
Update your display name and email address.
Privacy
Control who can see your profile and what communications you receive.
When to use
- Splitting a long form into labelled segments such as "Account" or "Billing".
- Rendering a fieldset with a legend for a set of tightly related inputs.
- Wrapping a single control with its label and error — use form-field instead.
Examples
Account settings panel
FormSection groups related account and privacy controls under a headed section. Text fields use FormField + Input; on/off settings use Toggle standalone (it renders its own label).
Fieldset with legend
Use as="fieldset" for semantically grouped inputs. The heading prop becomes a <legend>.
Responsive grid
Container-query-driven layout. Resize the outer container to see the grid respond.
Props
Name | Type | Default | Description |
|---|---|---|---|
as | discriminated-union | 'section' | Wrapper element. Default. |
heading | text | Heading text rendered as <h{level}>. | |
headingLevel | 23456 | 2 | Heading level. Default 2. |
description | text | Optional descriptive paragraph rendered under the heading/legend. | |
descriptionContent | snippet | The description with markup in it, such as a file name in code. It takes the place of
description inside the same paragraph and in the same style, so a page that needs one code
span does not draw its own paragraph beside the others. | |
meta | text | A short muted note beside the heading, on its baseline ("Read with every chat", "3 of 9").
It says what the section is for or how much is in it; a sentence of guidance is the
description. | |
metaAlign | 'inline' | 'end' | 'inline' | Places a short count or format note at the title row's end edge. The default keeps a note directly after its heading. |
columns | 1 | 2 | 3 | 4 | 2 | Column ceiling. Container queries pick the actual rendered count. Default 2. |
gap | 'default' | 'loose' | 'default' | Space between ungrouped fields. loose uses Cinder's space-6 step. |
grouped | boolean | false | Draws the children as one card on the GroupedList's surface, each child separated from the next
by a divider, under a heading sized by its level as a Section title is, and its description.
For a page of settings: the children are SettingRows, and a grouped section is always one
column. |
borderTone | 'default' | 'muted' | 'default' | The grouped card's structural edge. muted is an opt-in for a dense settings page where the
card's surface and row dividers already establish the group. |
children | snippet | Children (FormField instances or arbitrary content). Optional: a section with none draws its heading and description alone, for a list that is empty and says so in the page's own words. |