This documentation is available as Markdown for AI agents and LLMs. See the full Markdown index or append .md to any documentation URL.
This is documentation for the next SDK version. For up-to-date documentation, see the latest version (SDK 57).
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.
Unclipped scroll content
Requires iOS 17 or later. On older versions, the modifier is a no-op.
A scroll view clips its content to its own bounds, which cuts off anything drawn past them, such as a shadow or a card scaled up beyond the edge. Apply the scrollClipDisabled modifier to keep that content visible.
API
import { ScrollView } from '@expo/ui/swift-ui';
Component
Type: React.Element<ScrollViewProps>
SwiftUI ScrollView wrapper. To control scroll position, pair this with the
scrollPosition(state, { onChange }) modifier and a useNativeState-backed
id. Write state.value = targetId for an instant scroll, or wrap the write
in withAnimation(...) from @expo/ui/swift-ui for an animated one.
string • Default: 'vertical'The scrollable axes. Pass 'both' to enable 2D (horizontal + vertical) scrolling.
Acceptable values are: 'horizontal' | 'vertical' | 'both'
ReactNodeboolean • Default: trueWhether to show scroll indicators. For richer visibility control (e.g. 'never')
or per-axis control, use the scrollIndicators(...) modifier instead.
Types
Snapshot of a ScrollView's scroll geometry, emitted by the
useScrollGeometryChange(...) and onScrollPhaseChange(...) modifiers
(iOS 18+).