Stacks
An optional base for creating flex-based layouts
XStack, YStack, and ZStack provide styled flex layouts for horizontal, vertical, and overlapping content.
Features
X, Y, and Z flex stacks
Spacing between elements with gap
Press, focus, and layout events
Tamagui components include optional stack views: XStack, YStack and ZStack. They
extend the View from @tamagui/core,
so they accept all style properties.
Installation
Stacks is already installed in tamagui, or you can install it independently:
yarn
npm
bun
pnpm
Usage
To see all the style properties supported, see the Props documentation.
Fuller example
An example using a wide variety of style properties:
API reference
XStack, YStack, ZStack
Stacks accept all standard Tamagui Props.