Skip to main content

Interface: StackLayoutOptions

Stack placement and distribution.

Extends​

Properties​

PropertyTypeDescription
align?RelativeAlignCross-axis or grid-cell alignment: "start" (default), "center", or "end".
animate?LayoutAnimationWhether or how to animate elements into target positions. Can be true or a builder callback (position, el, index) => to(position).duration(0.8).
duration?numberFallback duration in seconds if animate: true is used (default: 0.6s).
gap?numberPrimary gap in stage units. Defaults: hstack 6, vstack 3, grid 4.
gapX?numberHorizontal gutter spacing in stage units.
gapY?numberVertical 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" | RelativeAlignMain-axis placement within the region; overrides that axis's coordinate. Default: unset.
region?LayoutRegionAvailable 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.