Stack
Layout
Takes a block
Vertical flex layout.
Stack(gap: …, align: …, justify: …) { … }
Example
Stack(gap: .sm) {
Text("First")
Text("Second")
}
Renders with the class wf-stack, stable across releases, so a stylesheet may target it.
| Prop | Type | Meaning |
|---|---|---|
| gap: | .xs .sm .md .lg .xl |
Space between children |
| align: | .start .center .end .stretch .baseline |
Cross-axis alignment |
| justify: | .start .center .end .between .around .evenly |
Main-axis distribution |
Attribute families: global, aria, data. Plus the universal props on every element: animate:, exit:, speed:, class:, ref:.