Stack

Layer arbitrary content with predictable CSS Grid overlap

Stack

Stack places direct children in the same CSS Grid area. The first child stays in front while later children form subtle layers behind it—no consumer-authored absolute positioning is required.

Cards

Stacked cards

Current review

Three checks are ready.

Direction

Use a directional class on the stack. Inline directions follow the document’s writing direction.

Directional stacks

Start
End

API

Class Purpose
.stack Grid overlap with a subtle bottom offset
.stack-top, .stack-bottom Block-axis layer direction
.stack-start, .stack-end Logical inline-axis layer direction

All children contribute to intrinsic grid sizing. If decorative duplicate layers contain no meaningful content, mark them aria-hidden="true".