Skip to content
SENVENLI UI

Section

Full-width page bands with a centered container; the heading that names a band is yours.
A page band
import { Section, Container } from "@senvenli/react/layout";

Examples

A call to action

A compact sunken band with a centered heading in a narrow container.

Guidelines

When to use it

  • Building marketing or landing pages from stacked bands.

Use something else when

  • A padded surface inside a page, not a full-width band. Box
  • The group is about one object. Card

Accessibility

Built in

  • A Section is a landmark; pass aria-labelledby with its heading's id to name it.

You provide

  • Heading levels that follow the page outline.

API reference

Section

childrenRequired
React.ReactNode
tone
"default" | "sunken"Default "default"

default on ds-surface; sunken for an alternate or CTA band. Never two sunken bands in a row.

density
DensityDefault "comfortable"

Vertical padding: ds-space-1000 from 768px and ds-space-600 below; compact keeps ds-space-600 throughout.

id
string

Anchor target for the Navbar; scrolling to it leaves room for the 56px sticky Navbar.

aria-labelledby
string

The id of the heading that names the band (a landmark needs a name to be listed).

isProgressive
boolean

Skip painting until the band is near the viewport (content-visibility: auto with a 720px intrinsic size): the content stays in the server HTML (find-in-page and anchors still work), nothing animates, and the reserved size keeps the layout from shifting.

It also contains the band (layout, paint and style containment): overflowing children are clipped at its edge, and fixed or floating children position against it instead of the viewport. So a progressive band holds no fixed, floating or bleeding content (portal overlays and floating banners to <body>), and the first, above-the-fold band is never progressive. The 720px is a desktop-tuned estimate; once painted, the browser remembers the real height.

Container

childrenRequired
React.ReactNode
width
"default" | "narrow"Default "default"

1200px (default) or 800px (narrow) at most, centred.