stack
Flex column with consistent vertical gap. Replaces the common pattern of adding margin-bottom to every child element.
stack({ gap: 'sm', align: 'start', content:
button({ label: 'Primary action' }) +
button({ label: 'Secondary action', variant: 'secondary' }) +
button({ label: 'Ghost', variant: 'ghost' })
})| Prop | Type | Default | |
|---|---|---|---|
content | string (HTML) | — | Raw HTML slot |
gap | string | 'md' | 'xs' · 'sm' · 'md' · 'lg' · 'xl' |
align | string | 'stretch' | 'stretch' · 'start' · 'center' · 'end' |