This documentation is available as Markdown for AI agents and LLMs. See the full Markdown index or append .md to any documentation URL.
Spacer
A SwiftUI Spacer component for flexible spacing.
iOS
tvOS
Included in Expo Go
For cross-platform usage, see the universal
Spacer— it renders the appropriate native component per platform.
Expo UI Spacer matches the official SwiftUI Spacer API and expands to fill available space in a stack.


Installation
Terminal
If you are installing this in an existing React Native app, make sure to install expo in your project.
Usage
Basic spacer in HStack
Use Spacer to push content to opposite ends of a horizontal stack.
SpacerHStackExample.tsx
Basic spacer in VStack
Use Spacer to push content to opposite ends of a vertical stack.
SpacerVStackExample.tsx
API
import { Spacer } from '@expo/ui/swift-ui';
Component
Type: React.Element<SpacerProps>