Skip to Content
Puzzle

Section

Theme-aware page sections with consistent content spacing.

Import

import { Section } from "@puzzle-ui/ui";

Themes and width

Section applies section colors and vertical spacing. A non-default theme paints the background across the available width while its children sit in a centered puzzle-container limited by --puzzle-container-width, with horizontal gutters. Default sections apply the container classes directly to their root. Use fullWidth to leave content unconstrained without container gutters, or noPadding to remove vertical padding.

390 × 500

API

PropTypeDefaultDescription
childrenReactNode-Section content.
theme"default" | "light" | "dark" | "primary" | "secondary" | "accent""default"Theme treatment.
fullWidthbooleanfalseRemoves the content width constraint and horizontal gutters. Themed backgrounds always fill the available width.
noPaddingbooleanfalseRemoves vertical section padding.
classNamestring-Root class.

compactTop, compactBottom, and divider are internal coordination props set by SectionStack; prefer composing sections rather than setting them manually. Section does not forward arbitrary native DOM attributes.

;