CSS Utilities Stack

Stack

A stack arranges its children in a vertical column with an equal gap between each item, so you don't have to add top or bottom margins to every element you put into it. It's the go-to layout for forms, paragraphs of text, card bodies, and anywhere you want consistent vertical rhythm.

By default, items stretch to fill the stack's width. Pair wa-stack with a wa-gap-* class to control the spacing and a wa-align-items-* class to change how children line up horizontally.

Examples

Link to This Section

Stacks are well suited for forms, text, and ensuring consistent spacing between elements in the document flow.

Align Items

Link to This Section

By default, items stretch to fill the inline size of the wa-stack container. You can add any of the following wa-align-items-* classes to an element with wa-stack to specify how items are aligned in the inline direction:

Gap

Link to This Section

By default, the gap between stack items uses --wa-space-m from your theme. You can add any of the following wa-gap-* classes to an element with wa-stack to specify the gap between items:

    No results