Components for arranging children vertically, horizontally, or layered front-to-back
Stacks are the primary layout primitives in BindJS. VStack, HStack, and ZStack arrange children vertically, horizontally, or as overlaid layers. LazyVStack and LazyHStack are virtualized variants for long scrollable lists. Group and Section add no layout of their own — they let you apply modifiers across multiple components or attach a header and footer for use inside List.Every stack accepts either (children) or (props, children). Alignment types differ by axis: VStack and LazyVStack use HorizontalAlignment, HStack and LazyHStack use VerticalAlignment, and ZStack uses Alignment.
VStack
Arranges children in a vertical line from top to bottom.
A single component or array of components to arrange horizontally.
object
Configuration options for the stack layout.
Show properties
number
The distance in points between adjacent children. When omitted, the system uses a default spacing.
VerticalAlignment
The vertical alignment of children within the stack. One of "top", "center", "bottom", "firstTextBaseline", or "lastTextBaseline". Defaults to "center".
A single component or array of components to arrange vertically with lazy rendering.
object
Configuration options for the lazy stack.
Show properties
number
The distance in points between adjacent children. When omitted, the system uses a default spacing.
HorizontalAlignment
The horizontal alignment of children within the stack. One of "leading", "center", or "trailing". Defaults to "center".
PinnedScrollableViews
Which views to pin during scrolling. One of "sectionHeaders", "sectionFooters", or "all". When set, Section headers and footers stick to the edges of the scroll view while their content is visible.
LazyVStack only creates views for children currently in the viewport. Always place it inside a ScrollView — without a scrollable parent there is no viewport boundary to drive the lazy rendering. For static lists, use VStack.
LazyHStack
A horizontal stack that renders only the children currently visible on screen. Use inside a horizontal ScrollView.
A single component or array of components to arrange horizontally with lazy rendering.
object
Configuration options for the lazy stack.
Show properties
number
The distance in points between adjacent children. When omitted, the system uses a default spacing.
VerticalAlignment
The vertical alignment of children within the stack. One of "top", "center", "bottom", "firstTextBaseline", or "lastTextBaseline". Defaults to "center".
PinnedScrollableViews
Which views to pin during scrolling. One of "sectionHeaders", "sectionFooters", or "all". When set, Section headers and footers stick to the edges of the scroll view while their content is visible.