Stack
Vertical flow with a consistent gap between children.
Live example
Stack
<div class="stack" style="--stack-gap: var(--dui-space-xs)">
<p>Stack item one</p>
<p>Stack item two, with <code>--stack-gap: var(--dui-space-xs)</code></p>
<p>Stack item three</p>
</div>
API
| Attribute or value | Effect |
|---|---|
class="stack" | |
--stack-gap | space between children (default: var(--dui-space-m)) |
Pattern: "The Stack", Every Layout, built with flexbox gap.
--stack-gap does not inherit, so nested stacks keep their own default.
Specifications
See also
- Layouts
- Component API convention
- Accessibility baseline
- Source:
css/layout/stack.css,examples/base.html
How other systems do it
For comparison only; these are not the standard this system follows.
- Apple Human Interface Guidelines: No equivalent
- Material Design 3: No equivalent
- Vercel Geist: No equivalent