Skip to content

Material Top Tabs

@react-navigation/material-top-tabs

Demo


A navigator that lets you switch between different routes by tapping the tabs or swiping horizontally.

Installation

Install @react-navigation/material-top-tabs dependencies

Terminal window
npx expo install @react-navigation/material-top-tabs react-native-tab-view react-native-pager-view

Copy/paste the following code to a _layout.tsx file and adjust all the MaterialTopTabs.Screen to your project’s screens:

Just as other navigators with expo-router, the default exported components in the same folder will be their own screen in the navigator.