This documentation is available as Markdown for AI agents and LLMs. See the full Markdown index or append .md to any documentation URL.
Background
A SwiftUI Background component for layering content behind another view.
Expo UI Background matches the official SwiftUI background modifier and draws background content behind a view, positioned with a specified alignment. The base view keeps its own size.
To fill a view with a color, material, or gradient, use the
backgroundmodifier from@expo/ui/swift-ui/modifiers.
Installation
If you are installing this in an existing React Native app, make sure to install expo in your project.
Usage
Basic background
Background alignment
Use the alignment prop to position the background content relative to the base view. Because the background does not affect the layout of the base view, a smaller background can be pinned to one of its edges.
API
import { Background } from '@expo/ui/swift-ui';
Component
Type: React.Element<BackgroundProps>