Skip to main content

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: neutral for ordinary prose, subtle for grouping, accent for calls to action
  • Use sm and lg to nudge vertical padding rather than overriding it with margins
  • Apply .breakout to 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 accent sections 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​

SlotRequiredDescription
contentYesBody content rendered inside the section. Must be wrapped in elements.

Props​

PropTypeDefaultDescription
classesarray-Additional CSS class words merged into the root element.
attributesobject-Additional HTML attributes spread on the root element.

Classes​

ClassCapabilityDefaultDescription
.subtleEmphasis-Lower emphasis; a muted, quieter weight.
.neutralEmphasisYesDefault emphasis; the standard weight at balanced contrast.
.accentEmphasis-Higher emphasis; a stronger, louder weight.
.smSize-Small.
.mdSizeYesMedium.
.lgSize-Large.
.fluidLayout-Full-width, no max-width.
.containedLayoutYesConstrained to a max-width.
.flatElevationYesNo elevation.
.raisedElevation-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 or aria-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
  • container - constrains content width inside non-section pages
  • grid - lays out columns inside a section
  • card, callout, content - components that typically sit inside a section