Stack @astryx-svelte/core v0.3.0 · Stack

Usage

Stack arranges items in a row or column with consistent spacing. Use the gap prop to control the space between items.
ts
import { Stack } from '@astryx-svelte/core';

Best practices

GuidancePractices
DoUse the gap prop for spacing between items; don't add margins manually.
DoUse StackItem with size="fill" to make one item stretch and fill the leftover space.
Don'tNest stacks inside stacks; try wrap="wrap" first to let items flow to the next line.

Examples

Common configurations, variations, and states.
Stack — Alignment
Buttons positioned at the start, center, and end of a row.
Stack — Fill Item
An avatar, text, and button in a row; the text stretches to fill the available space.