This documentation is available as Markdown for AI agents and LLMs. See the full Markdown index or append .md to any documentation URL.
ZStack
A SwiftUI ZStack component for overlapping layouts.
iOS
tvOS
Included in Expo Go
Expo UI ZStack matches the official SwiftUI ZStack API and overlays its children on top of each other.


Installation
Terminal
If you are installing this in an existing React Native app, make sure to install expo in your project.
Usage
Basic overlapping stack
BasicZStackExample.tsx
With alignment
The alignment prop controls how children are positioned within the stack. Available options include: center, leading, trailing, top, bottom, topLeading, topTrailing, bottomLeading, and bottomTrailing.
ZStackAlignmentExample.tsx
Creating a badge overlay
ZStackBadgeExample.tsx
API
import { ZStack } from '@expo/ui/swift-ui';
Component
Type: React.Element<ZStackProps>