Components · Layout
Section
StableAdded v0.0.1
A full-width page band with vertical padding and a background tone; put a `Container` inside.
import { Section } from '@nexub/react';Playground
Props
paddingY
tone="default"
tone="subtle"
tone="muted"
tone="inverse"
<Section key={tone} tone={tone} aria-label={`${tone} tone`} paddingY="sm">…</Section>Examples
Tones
States
tone="default"
tone="subtle"
tone="muted"
tone="inverse"
defaulttone="default"
tone="subtle"
tone="muted"
tone="inverse"
tone="subtle"tone="default"
tone="subtle"
tone="muted"
tone="inverse"
tone="default"tone="default"
tone="subtle"
tone="muted"
tone="inverse"
tone="muted"tone="default"
tone="subtle"
tone="muted"
tone="inverse"
tone="inverse"
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| paddingY | 'sm' | 'md' | 'lg' | 'md' | Vertical padding: 48, 80 or 128 px. |
| tone | 'subtle' | 'default' | 'muted' | 'inverse' | 'default' | Background: the surface, two container tints, or the inverse surface. |
| asChild | boolean | false | Apply the classes to the child element instead of a <section>. |
Accessibility
Notes
A `<section>` is a region landmark only when it has an accessible name: give it `aria-labelledby` pointing at its heading.
On iOS & Android
Web only
Section has no @nexub/react-native twin. On phones, follow the platform pattern instead, or compose it from the native components listed on the React Native page.