Layout

One block per primitive from docs/components/Layout/: a props table (from the docs) and a live example. Full prose lives under header Documentation → Layout.

Box

Props (docs/components/Layout/Box.md)

PropTypeDefaultDescription
asBoxAsProp`div`Host tag; for `a`, `button`, `label`, etc. — typed attributes.
SpacingPropssee typew, h, minW, maxW, p, m, gap, display, flex*, grid*, position, backgroundColor, borderRadius, etc.
…DOMHTML attrsOther native props (`id`, `aria-*`, `onClick`, `href` for `as="a"`) pass through to the element.

Section

Polymorphic Box as a section shell plus typography from the theme.

Container

PropTypeDefaultDescription
maxWpreset | number | string`lg`sm | md | lg | xl | 2xl | full or a length.
centerboolean`true`Horizontal centering via margin auto.
paddingnumber | stringShorthand padding for the container.
+ BoxSpacingPropsheight / h; otherwise same as Box.

Narrow column (maxW: sm), padding via px / py and secondary text color from tokens.

Stack, HStack, VStack

PropTypeDefaultDescription
directionrow | column | …`row`For Stack — flex-direction.
alignalign-items`center` (`stretch` on VStack)Cross axis.
justifyjustify-content`flex-start`Main axis.
wrapnowrap | wrap | …`nowrap`Flex line wrapping.
reverseboolean`false`HStack / VStack only — switches to *-reverse.
+ BoxSpacingPropsgap, p, w, and other Box props.

HStack / VStack share the same props; VStack defaults to align="stretch".

Left

Right

First in DOM

Second in DOM

Flex

PropTypeDefaultDescription
directionFlexDirection`row`Main axis direction.
wrapFlexWrap`nowrap`flex-wrap.
justifyFlexJustify`flex-start`justify-content.
alignFlexAlign`stretch`align-items.
alignContentFlexAlignContent`stretch`Alignment when there are multiple flex lines.
gapnumber | stringGap between items.
grow / shrink / basisnumber | stringShorthands for flex-grow / shrink / basis.
reverseboolean`false`Reverse direction.
+ BoxSpacingPropsNo display/flexDirection from Box (Flex sets those).

A

B

C

Grid

PropTypeDefaultDescription
columnsnumber | stringNumber → repeat(n, 1fr); otherwise a CSS track list string.
rowsnumber | stringSame idea for rows.
gap / rowGap / columnGapnumber | stringGrid gutters.
areasstring[]grid-template-areas.
justifyItems / alignItems`stretch`Cell alignment.
justifyContent / alignContent`start` / `stretch`Grid tracks within the container.
autoFlow / autoColumns / autoRowsstringImplicit grid placement.
template{ columns?, rows?, areas? }Takes precedence over separate columns/rows/areas.
+ BoxSpacingPropsw, h, padding, layout — same as Box.

Cell 1

Cell 2

Center

PropTypeDefaultDescription
horizontalboolean`true`Center on the horizontal axis.
verticalboolean`true`Center on the vertical axis.
centerboolean`true`If true — both axes.
inlineboolean`false`inline-flex.
width / heightnumber | stringAliases; prefer w / h.
+ LayoutBoxPropsSpacingPropsgap, padding, background, etc.

Centered on both axes

Flex + Center

Composition pattern: Flex defines the region; Center centers its child.

Centered

Separator

PropTypeDefaultDescription
orientation"horizontal" | "vertical"`horizontal`Line direction.
sizenumber | string`1`Thickness (number → px).
colorstring`gray.200`Line fill (background-color).
marginnumber | stringOuter margin.
+ BoxSpacingPropsExcludes spacing color as text color.

Section A

Section B

Left
Right

Bleed

PropTypeDefaultDescription
allnumber | stringNegative margin on all sides.
horizontal / verticalnumber | stringTwo-axis shorthands.
top / right / bottom / leftnumber | stringPer side; overrides axis/all when both apply.
width / heightnumber | stringAliases for w / h.
+ BoxSpacingPropsRemaining Box props.

Text respects parent padding

Content breaks out with negative horizontal margins

AspectRatio

PropTypeDefaultDescription
rationumber`16/9`Width ÷ height.
maxW / maxHnumber | stringVia Box.
objectFitCSS object-fit`cover`When there is a single DOM child element.
+ BoxSpacingPropspadding, borderRadius, etc.

16:9

VisuallyHidden

PropTypeDefaultDescription
showOnFocusboolean`false``span` for skip links; visibility via :focus in CSS.
+ HTML attrsHTMLAttributesclassName, id, aria-*, data-*.

The “Open menu” label is exposed to screen readers and visually hidden.

Sticky

PropTypeDefaultDescription
topnumber | string`0`Offset when stuck; used in rootMargin for the observer.
bottom / left / rightnumber | stringPosition in fixed state.
zIndexnumber`1000`Layer while sticky.
enabledboolean`true`Disable observer and sticking.
shadowstringbox-shadow while sticky.
+ HTML attrsHTMLAttributesclassName, style on the wrapper (not Box).

Scroll the region — this bar sticks

Content row 1

Content row 2

Content row 3

Content row 4

Content row 5

Content row 6

Content row 7

Content row 8

Content row 9

Content row 10