Skip to content

Section ​

Section is a titled part of a page, such as a group of settings or a part of a form.

When to use ​

Use it on a page, stacked with gap 0. Put a status (saving, saved) on the right of the title and a sentence that applies to the whole section in note. Actions that create something start the content, in a Row; a count ends it, in a caption. Inside a panel, use SectionHeader.

Props ​

PropDefaultDescription
titlerequiredThe title (h2)
noteOne sentence under the title
statusA short status on the right of the title
gaplg0, sm, md or lg between the content's children
flushfalseThe content ends with a list or a tree
childrenrequiredThe content

Contract ​

The head (title, xs, note) is gap-lg from the content. Each section has gap-lg below it (gap-sm when flush, since the last list item's padding is part of the distance; 0 for the last section). Each section after the first draws a line along its top, with pad-lg down to the title, which is trimmed to its ink. Buttons inside take the height of a button.

Example ​

Section

Released under the Apache-2.0 license.