layout-stack
Vertical stacking layout with configurable gap. The fundamental building block for vertical rhythm.
Attributes
| Attribute | Values | Default | Description |
|---|---|---|---|
data-layout-gap |
none, 3xs, 2xs, xs, s, m, l, xl, 2xl, 3xl |
m |
Controls the vertical gap between child elements |
data-layout-align |
start, center, end, stretch |
stretch |
Controls horizontal alignment of child elements |
Gap Variants
The data-layout-gap attribute controls the spacing between stacked items.
data-layout-gap="xs"
Item 1
Item 2
Item 3
data-layout-gap="m" (default)
Item 1
Item 2
Item 3
data-layout-gap="xl"
Item 1
Item 2
Item 3
Code
Alignment Variants
The data-layout-align attribute controls horizontal alignment of items.
data-layout-align="start"
data-layout-align="center"
data-layout-align="end"
Code
Usage Examples
Form Layout
Card Content
Card Title
Card description text that explains the content.
Nested Stacks
Section 1
Content for section 1
Section 2
Content for section 2
CSS Implementation
Related Elements
- layout-cluster - Horizontal grouping with wrapping
- layout-grid - Auto-fit grid layout
- layout-sidebar - Two-column layout with sidebar
- layout-card - Card container