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.
Expo UI ZStack matches the official SwiftUI ZStack API and overlays its children on top of each other.
Installation
If you are installing this in an existing React Native app, make sure to install expo in your project.
Usage
Basic overlapping stack
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.
Creating a badge overlay
API
import { ZStack } from '@expo/ui/swift-ui';
Component
Type: React.Element<ZStackProps>
stringThe alignment of children within the stack.
Acceptable values are: 'center' | 'leading' | 'trailing' | 'top' | 'bottom' | 'topLeading' | 'topTrailing' | 'bottomLeading' | 'bottomTrailing' | 'centerFirstTextBaseline' | 'centerLastTextBaseline' | 'leadingFirstTextBaseline' | 'leadingLastTextBaseline' | 'trailingFirstTextBaseline' | 'trailingLastTextBaseline'