The structural region.
Primitive contract
Section
Creates finite section-level block rhythm and an optional structural boundary without child-margin hacks.
Vertical rhythm region · @sanchika/primitivesPurpose and semantics
Creates finite section-level block rhythm and an optional structural boundary without child-margin hacks.
Recommended semantic: Prefer section only when it has an accessible heading; otherwise use div, header, footer, or the appropriate landmark.
Anatomy
Optional heading that labels a semantic section.
Finite variants and important states
- Variant · space
- sm, md, lg
- Variant · boundary
- none, bordered
- Required states
- default
- Class hooks
.sk-section · .sk-section-space-sm · .sk-section-space-md · .sk-section-space-lg · .sk-section-bordered
Composed synthetic exemplar
Rendered state matrix
Section: 1 required state
Each specimen starts from the package-owned example and contract state inventory. Simulated pointer and focus frames are labelled; consumers still verify real interaction in context.
Accessibility and consumer responsibility
- Section adds no keyboard behavior.
- Do not create an unnamed section landmark
- Keep heading levels logical
- Choose the correct landmark or neutral element
- Provide a visible heading for semantic section elements
- Token-driven block rhythm remains intentional without arbitrary mobile overrides.
No override is needed because the primitive adds no motion.
- The optional structural boundary remains visible with system CanvasText.
Compact API reference
- Package
@sanchika/primitives- CSS
@sanchika/primitives/styles.css- Contract
primitiveSpecs.find((contract) => contract.name === "Section")- Primary class
.sk-section