Section
Full-width page section with contained content by default. The <section> element is a CSS grid with a content column sized to the container width; direct children sit in that column and appear contained, while a child with .breakout escapes the column and spans the full section width. A .container child spans the full width too, so it can lay out its own content column. The emphasis ladder runs from neutral (the default - no band, content sits on the page surface) through subtle (a quiet wash) to accent, a full-bleed band on the accent surface. Emphasis colors the section itself; children keep their own styling and carry their own emphasis values.
Usage
When to use
- Major page regions that benefit from a semantic
<section>boundary and consistent vertical rhythm - Full-bleed colored bands that need the background to extend edge-to-edge while content stays contained
- Editorial pages where some children must break out of the content column (gallery rows, featured callouts, full-width media)
When not to use
- Tightly grouped content inside an article - use the appropriate component (callout, card, content) directly
- Layout grids inside a section - use the project grid utility nested inside section content
- The page-level
<main>landmark - section is meant to sit inside<main>, not replace it
Do
- Pair the emphasis value with the editorial intent:
neutralfor ordinary prose,subtlefor grouping,accentfor calls to action - Use
smandlgto nudge vertical padding rather than overriding it with margins - Apply
.breakoutto children that should span the full width, including media galleries and feature bands
Don't
- Don't override the section's grid template - children rely on the contained-column behavior
- Don't stack multiple
accentsections in a row - their emphasis dilutes when repeated - Don't put global navigation or footer chrome inside a section - those belong in header and footer
API
Slots
| Slot | Required | Description |
|---|---|---|
content | Yes | Body content rendered inside the section. Must be wrapped in elements. |
Props
| Prop | Type | Default | Description |
|---|---|---|---|
classes | array | - | Additional CSS class words merged into the root element. |
attributes | object | - | Additional HTML attributes spread on the root element. |
Classes
| Class | Capability | Default | Description |
|---|---|---|---|
.subtle | Emphasis | - | Lower emphasis; a muted, quieter weight. |
.neutral | Emphasis | Yes | Default emphasis; the standard weight at balanced contrast. |
.accent | Emphasis | - | Higher emphasis; a stronger, louder weight. |
.sm | Size | - | Small. |
.md | Size | Yes | Medium. |
.lg | Size | - | Large. |
.fluid | Layout | - | Full-width, no max-width. |
.contained | Layout | Yes | Constrained to a max-width. |
.flat | Elevation | Yes | No elevation. |
.raised | Elevation | - | Slight elevation. |
Examples
Default
Bare section with no background; content is constrained via the grid column.
Subtle
Slight visual break for grouping related content without strong emphasis.
Neutral
The default emphasis, stated explicitly. No band - content sits on the page surface, exactly as the unclassed section above.
Accent
Full-bleed band on the accent surface, for calls to action and featured content.
Small
Reduced vertical padding via the sm value.
Large
Extra vertical padding via the lg value.
With breakout
Section with one default child contained in the column and one .breakout child spanning full width.
Page rhythm
Realistic editorial stack of sections demonstrating how emphasis values build visual rhythm down a page.
Accessibility
- WCAG 2.2 AA
- Native
<section>exposes a generic region; consumers add an accessible name (heading inside oraria-labelledby) when the region needs to be announced as a landmark - Emphasis colors always pair with text contrast that meets WCAG AA against the section background
- Reduced-motion users see no animation - section is a static layout primitive