Section
A full-width page section with vertical padding, background color, and optional divider borders. Designed to wrap a Container for structured page layouts.
Basic Usage
Background Variants
Release notes
Version 4.2 adds offline drafts. Read the full changelog for every change.
Upgrading to 4.2
Most apps need no change. The upgrade notes list the few that do.
inverse and accent fill the section and set its text color. A heading, a link component, a prose and a text take that color, so they stand in the section's color and not in the page's; a text with a status intent keeps its own. A control in the section draws its focus ring in that color as well. A component with a surface of its own, such as a card or an alert, keeps the colors of its surface, and what it holds takes the page's colors and focus ring again.
Other components write in the page's colors. For a dark section that holds more than words, a dark island fits better: class="dark" on a section with a background, muted for one, turns every token in it dark, cards and fields included, as Theming shows.
Dividers
Add horizontal borders to visually separate sections.
Padding Sizes
Props
| Prop | Type | Default | Description |
|---|---|---|---|
padding |
string | 'xl' |
Vertical padding: none, sm, md, lg, xl, 2xl |
background |
string | 'default' |
Background: default, muted, subtle, inverse, accent |
divider |
string | 'none' |
Border dividers: none, top, bottom, both |
as |
string | 'section' |
HTML element to render |
scope |
string|null | null |
Scoped personalization name |
Keyboard Interaction
This component is a layout wrapper. Keyboard interaction is delegated to its children.
Design Tokens
| Token | Used for |
|---|---|
--space-wk-sm through --space-wk-2xl |
Vertical padding |
--color-wk-bg-muted |
Muted background |
--color-wk-bg-subtle |
Subtle background |
--color-wk-bg-inverse |
Inverse background |
--color-wk-text-inverse |
Inverse text color |
--color-wk-accent |
Accent background |
--color-wk-border |
Divider border color |