Overview
Reference usage
Section groups content under a heading with no box. It takes a heading, an optional description, an optional action aligned with the heading, and the content. Space, not a surface or a border, separates one section from the next. The content is a block, so its children never shrink inside a flex or scroll parent.
Levels 2 and 3 both use --cinder-text-lg, so a level 3 title sits above the base-size terms it heads. Levels 4 to 6 use the small size in muted text. Pick the heading level that follows the page outline without skipping a level.
A Section ends at its header when you omit the content or the children snippet renders nothing. With content, --cinder-space-3 separates it from the header.
Usage
Sections side by side or in a gap
In a Stack rhythm="page", a Section takes its step from the stack. The stack uses --cinder-space-8 before a Section or a wrapper whose first child is a Section.
A section that directly follows another section takes a --cinder-space-8 top margin, the space between sections in a page's flow. A flex or grid parent that spaces its sections with gap therefore gives each section a wrapper of its own: two adjacent sections in a gap container add that margin to the gap, so stacked sections sit twice as far apart and, side by side, the second one starts lower than the first.
Upcoming
The next seven days
Two bars and a rooftop are open late on Friday.
Saved
Nothing saved yet.
When to use
- Grouping content under a heading on a page or in a panel without drawing a boxed surface around it.
- Pairing a heading with an action such as "Add" or "See all" above a list.
- The content needs its own raised surface or an edge — use card.
- Introducing a whole page with eyebrow label and tabs — use section-heading.
Examples
A heading, an action and content
A section is a heading with an optional description and action, then its content. Space separates it from the next section; nothing is boxed.
A tall section keeps every child
The content is a block, so children that clip their overflow are never squeezed inside a flex or scroll parent.
Props
Name | Type | Default | Description |
|---|---|---|---|
title required | text | The section's heading text. | |
description | text | Supporting line under the heading, in muted text. | |
level | 23456 | 2 | Heading level of the title. Pick the level that fits the page outline. |
actions | snippet | Controls aligned with the heading, such as an "Add" or "See all" button. They never make the header taller than its title. | |
children | snippet | The section's content. Children never shrink inside a flex or scroll parent. |