Section
Section is a full-width vertical-rhythm band. Unlike Container it does not
constrain width — use it for full-bleed padded regions, and nest a
Container inside when the content should also be centered. RSC-safe.
Import from "@desk/ui/components/section".
Materials
Vertical rhythm between grouped blocks.
Usage
import { Section, SectionProps } from "@desk/ui/components/section";Best practices
Sectionis full-width (padding only, no max-width) — nest aContainerinside when content should also be centered; useContaineralone when you just need the width cap.Tune vertical rhythm with
space(itspy, defaultbase);as/asChildare mutually exclusive withasChildwinning (dev-warned).
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| as | "div" | "li" | "nav" | "ol" | "span" | "ul" | "article" | "aside" | "figcaption" | "figure" | "footer" | "header" | "main" | "section" | Render as a different host element from the closed layout vocabulary
({@link LayoutElement}). The set is deliberately closed: | |
| asChild | boolean | Merge props onto the child element instead of rendering a | |
| inset | "none" | "gutter" | ResponsiveValue<"base" | "2xs" | "xs" | "sm" | "lg" | "xl" | "2xl" | "3xl"> | Horizontal gutter. Defaults to | |
| responsiveMode | ResponsiveMode | Responsive mode: | |
| space | ResponsiveValue<SectionSpace> | Vertical rhythm (py). Responsive; defaults to |
Also exports
- interface
SectionProps