AnyLumino
API referenceastryxsurfaces

Stack

Arrange child widgets in an Astryx stack.

Astryx Props

JSON-safe Stack props forwarded to Astryx.

Supported Astryx props include:

  • direction ('horizontal' or 'vertical'; default 'vertical'): Direction of the stack layout.
  • hAlign (StackAlignment): Horizontal alignment. With horizontal direction it controls the main axis; with vertical direction it controls the cross axis.
  • vAlign (StackAlignment): Vertical alignment. With horizontal direction it controls the cross axis; with vertical direction it controls the main axis.
  • justify (StackMainAlignment): Main-axis alignment alias resolved from direction, mirroring CSS justify-content.
  • align (StackCrossAlignment): Cross-axis alignment alias resolved from direction, mirroring CSS align-items.
  • width (number or string): Container width. Numbers are pixels; strings are used as CSS values.
  • height (number or string): Container height. Numbers are pixels; strings are used as CSS values.
  • gap (spacing step): Spacing between items. Accepts Astryx spacing steps such as 0, 0.5, 1, 2, 3, 4, 6, 8, and 10.
  • padding (spacing step): Inner padding on all sides using the spacing scale.
  • paddingInline (spacing step): Horizontal padding override; takes precedence over padding on the inline axis.
  • paddingBlock (spacing step): Vertical padding override; takes precedence over padding on the block axis.
  • isScrollable (boolean; default false): Enables scrollable overflow on the stack container.
  • wrap ('nowrap' or 'wrap' or 'wrap-reverse'; default 'nowrap'): Controls whether items wrap onto additional lines.
  • as (ElementType; default div): Element type to render for the root element.
  • xstyle (StyleXStyles): StyleX styles created with stylex.create().
  • className (string): CSS class names appended to the root element.
  • style (CSSProperties): Inline styles applied after StyleX styles.
  • children (ReactNode): Content rendered inside the stack.

Props typed as React nodes, render functions, event handlers, refs, or StyleX styles are documented for Astryx parity but cannot be serialized directly from Python unless the wrapper adapts them.

See Astryx component docs: https://astryx.atmeta.com/components/Stack.

Functions

constructor__init__(children=None, *, direction='vertical', gap=2, align=None, justify=None, width=None, height=None, padding=None, wrap=None, scrollable=None, **props) -> None
paramchildrenChildInput
= None

Child widget, sequence of widgets, or mapping of slot names to widgets.

paramdirectionstr
= 'vertical'

Layout direction.

paramgapint | float
= 2

Astryx spacing step between children.

paramalignstr | None
= None

Cross-axis alignment.

paramjustifystr | None
= None

Main-axis alignment.

paramwidthint | float | str | None
= None

Container width.

paramheightint | float | str | None
= None

Container height.

parampaddingint | float | None
= None

Inner padding using the Astryx spacing scale.

paramwrapstr | None
= None

Stack wrapping behavior.

paramscrollablebool | None
= None

Whether overflow should scroll.

parampropsAny
= {}

Returns

None

On this page