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 58).
Expo Router Split View
An Expo Router submodule that provides native split view layout.
SplitViewis an alpha API for iOS. It requiresreact-native-screens5.0.0-beta.2 or later.
expo-router/unstable-split-view is a submodule of expo-router and exports components to build split view layouts using platform-native system split views.
See the Expo Router reference for more information about the file-based routing library for native and web app.
Platform support
Split View is only available on iOS. On other platforms, the SplitView component automatically falls back to rendering as a standard Slot navigator, ensuring your app works across all platforms without conditional code.
iPhone support
On iPhone, SplitView automatically collapses all columns into a single view. Only one column is visible at a time.
Choosing the initial column
Use the topColumnForCollapsing prop to control which column is displayed when the split view is collapsed:
<SplitView topColumnForCollapsing="primary">{/* ... */}</SplitView>
Accepted values are primary, supplementary, and secondary. When not set, the system uses its default behavior.
Navigating between columns
Use a ref to programmatically show a specific column with the show method:
import { useRef } from 'react'; import { Pressable, Text } from 'react-native'; import { SplitView } from 'expo-router/unstable-split-view'; import type { SplitHostCommands } from 'react-native-screens'; export default function Layout() { const ref = useRef<SplitHostCommands>(null); return ( <SplitView ref={ref} topColumnForCollapsing="primary"> <SplitView.Column> <Pressable onPress={() => ref.current?.show('secondary')}> <Text>Show main content</Text> </Pressable> </SplitView.Column> </SplitView> ); }
Known limitations
Cannot be nested
There can only be one SplitView in the navigation hierarchy. Attempting to nest split views will result in an error.
Only specific children allowed
SplitView only accepts SplitView.Column, SplitView.Content, and SplitView.Inspector as direct children. Other components will be ignored with a warning.
Limited API
The current API surface is minimal and may not cover all use cases. Additional props and configuration options will be added in future releases.
Going back to previous column on iPhone
To go back to a previous column, tap the system back button in the navigation bar. A future release will add more granular programmatic control over back navigation.
Note: We are actively developing
SplitViewand looking for feedback. You can share your thoughts on Discord, open an issue on GitHub, or use the Feedback button at the bottom of this page.
Installation
To use expo-router/unstable-split-view in your project, you need to install expo-router in your project. Follow the instructions from Expo Router's installation guide:
Learn how to install Expo Router in your project.
Using SplitView.Column
SplitView.Column defines additional columns in your split view layout. You can add up to two columns before the main content area.
SplitView applies the left and right safe area insets to the content of each column, the main content area, and the inspector. The horizontalSafeAreaInsets prop controls when:
'expanded'(default): only when the split view shows more than one column.'always': also when the split view collapses to one column.'never': never. Apply the insets yourself withSafeAreaViewfromreact-native-screens/experimental, as in the example below. Otherwise, the content can show under the sidebar.
A vertical ScrollView does not add left and right content insets by default. If the column content is a ScrollView, set horizontalSafeAreaInsets="never" so that the scroll view fills the column from edge to edge. Then apply the left and right insets inside the scroll view:
Two-column layout
A simple sidebar with main content:
Three-column layout
A sidebar with supporting column and main content:
Column headers
Use the header prop of SplitView.Column and SplitView.Content to configure the column's navigation bar. The prop accepts Stack.HeaderConfig props from React Native Screens. Set iOS-specific options under ios.
The column header configuration API can change in patch releases.
If you used the earlier SplitView header API, move largeTitle to ios.largeTitleEnabled, leftToolbar to ios.leadingItems, and rightToolbar to ios.trailingItems. Give each toolbar button a unique id and set its type to 'item'. Set title colors through ios.standardAppearance and ios.scrollEdgeAppearance.
SplitView.Inspector does not support header. SplitView ignores it and logs a warning only in development builds.
Navigation stack in the content column
Set stackIntegration on SplitView.Content to navigate the content column with an ExperimentalStack. The layout of the content route must render the stack as its root. The stack pushes screens in the content column and provides its navigation bar.
app_layout.tsx(content)_layout.tsxindex.tsx[id].tsxWith stackIntegration, the content column ignores header and does not apply the horizontal safe area insets.
With
react-native-screens5.0.0-beta.2, replacing the only screen in the content stack with<Link replace>can crash an iOS debug build. See react-native-screens issue #5340.
Using SplitView.Inspector
SplitView.Inspector adds a supplementary column that slides in from the trailing edge, useful for showing additional details or metadata:
<SplitView> <SplitView.Column>{/* Sidebar */}</SplitView.Column> <SplitView.Inspector> <View style={{ flex: 1, padding: 16 }}> <Text>Inspector Panel</Text> </View> </SplitView.Inspector> </SplitView>
Complete example
Here's a password manager-style app with three columns. Each row background extends to the column edges, and only the row text is inset. For this reason, the example sets horizontalSafeAreaInsets="never" and applies the left inset itself:
app_layout.tsxindex.tsx[type][id].tsxindex.tsxAPI
import { SplitView } from 'expo-router/unstable-split-view';
Components
Type: React.Element<SplitViewProps>
For full list of supported props, see SplitHostProps
boolean • Default: falseEnables React Activity for screens rendered by the detail slot.
ReactNodestring • Default: 'expanded'When SplitView applies the left and right safe area insets to the content of each column and inspector.
'expanded': only while the split view shows more than one column.'always': in all modes.'never': never. Apply the insets yourself, for example withSafeAreaViewfromreact-native-screens/experimental. Otherwise, the content can show under the sidebar.
Acceptable values are: 'never' | 'always' | 'expanded'
Inherited props
Omit<SplitHostProps, 'children'>
Type: React.Element<SplitViewColumnProps>
ReactNodeType: React.Element<SplitViewColumnProps>
Type: React.Element<SplitViewContentProps>
Configures the content column of the SplitView. The column renders the current route.
StackHeaderConfigPropsNavigation bar of the content column, which renders the current route.
Ignored when stackIntegration is set.
boolean • Default: falseWhether the route is the only child of the content column. When the layout of the route renders an
ExperimentalStack as its root, the stack then navigates the column, and its header is the navigation bar of
the column. A stack that is not the root of the route is not shown.
The column then does not apply the horizontal safe area insets.
Methods
Configures the content column of the SplitView. The column renders the current route.
nullTypes
Type: ComponentProps<StackV5.HeaderConfig>
Props for the navigation bar of a SplitView column. See the React Native Screens header configuration.