This documentation is available as Markdown for AI agents and LLMs. See the full Markdown index or append .md to any documentation URL.
ScrollView
A SwiftUI ScrollView component for scrollable content.
For cross-platform usage, see the universal
ScrollView— it renders the appropriate native component per platform.
Expo UI ScrollView matches the official SwiftUI ScrollView API and provides a scrollable container for its children.
Installation
If you are installing this in an existing React Native app, make sure to install expo in your project.
Usage
Basic vertical scroll view
A simple vertically scrollable list of text items.
Horizontal scroll view
Use the axes prop to scroll horizontally.
Hidden scroll indicators
Set showsIndicators to false to hide the scroll bars.
Shared scroll position
Requires iOS 17 or later. On older versions, the modifier is a no-op.
Track the leading scroll target id from JavaScript and scroll to a target by writing to the state. Mark each scroll target with the id modifier, wrap the content container in scrollTargetLayout, and apply the scrollPosition modifier to the ScrollView. The optional onChange callback fires on the JS thread when the leading target changes.
The scrollPosition modifier also works on other scrollable containers like LazyVStack and LazyHStack.
Writes to
state.valuemust run on the UI runtime. Wrap the write inscheduleOnUIfromreact-native-worklets, or call them from inside a'worklet'function. Writes from the JS runtime trip Main Thread Checker, Xcode's runtime tool that flags UIKit calls made from a background thread.
API
import { ScrollView } from '@expo/ui/swift-ui';
Component
Type: React.Element<ScrollViewProps>