Interface: StackLayoutOptions
Stack placement and distribution.
Extends
Properties
| Property | Type | Description |
|---|---|---|
align? | RelativeAlign | Cross-axis or grid-cell alignment: "start" (default), "center", or "end". |
animate? | LayoutAnimation | Whether or how to animate elements into target positions. Can be true or a builder callback (position, el, index) => to(position).duration(0.8). |
duration? | number | Fallback duration in seconds if animate: true is used (default: 0.6s). |
gap? | number | Primary gap in stage units. Defaults: hstack 6, vstack 3, grid 4. |
gapX? | number | Horizontal gutter spacing in stage units. |
gapY? | number | Vertical gutter spacing in stage units. |
height? | Size | Size[] | Element height in stage units or CSS length; arrays select columns (hstack) or rows (vstack/grid). Overrides existing heights. |
justify? | "space-between" | RelativeAlign | Main-axis placement within the region; overrides that axis's coordinate. Default: unset. |
region? | LayoutRegion | Available space. Default: full stage. Coordinates remain absolute stage units. |
rule? | boolean | { borderStyle?: "solid" | "dashed" | "dotted"; bracket?: number | boolean; className?: string; color?: string | string[]; inset?: number; radius?: string | number; side?: "top" | "left" | "right" | "bottom"; thickness?: string | number; } | Optional divider rule(s) placed in gutters between elements or columns/rows. |
width? | Size | Size[] | Element width in stage units or CSS length; arrays select columns (hstack/grid) or rows (vstack). Overrides existing widths. |
x? | number | "center" | Left edge in stage units, or "center". Default: region left edge. |
y? | number | "center" | Top edge in stage units, or "center". Default: region top edge. |