Skip to main content

Expo Router v55: Building Native Tabs and Stack Navigation

· 4 min read

Expo Router maps files to routes. In v55, navigation can also use more of each platform's native UI. That is useful when your design calls for familiar iOS and Android tab bars rather than a heavily customized JavaScript tab bar.

Let's build a small app with two tabs and a detail screen reachable from the Home tab.

1. Start with SDK 55​

npx create-expo-app@latest navigation-demo --template default@sdk-55
cd navigation-demo
npx expo start

The SDK 55 default template already includes Expo Router. If you are adding Expo Router to another project, follow its installation guide rather than assuming the same setup. That unversioned installation guide can change; select SDK 55-compatible packages and use the versioned references below for this tutorial.

2. Plan the routes​

Use the following route tree as the complete demo route set. Save any existing work, then remove or relocate template screens and layouts that conflict with it. Keep shared components outside src/app and keep only one route root:

src/app/
_layout.tsx
(tabs)/
_layout.tsx
index.tsx
settings.tsx
details.tsx

The (tabs) directory is a route group: its name helps organize navigation but does not appear in the URL.

3. Set up the root stack​

In src/app/_layout.tsx:

import { Stack } from 'expo-router';

export default function RootLayout() {
return (
<Stack>
<Stack.Screen name="(tabs)" options={{ headerShown: false }} />
<Stack.Screen name="details" options={{ title: 'Details' }} />
</Stack>
);
}

The stack owns the Details screen. The tab group has its own layout below.

4. Define native tabs​

In src/app/(tabs)/_layout.tsx:

import { NativeTabs } from 'expo-router/unstable-native-tabs';

export default function TabsLayout() {
return (
<NativeTabs>
<NativeTabs.Trigger name="index">
<NativeTabs.Trigger.Icon sf="house" md="home" />
<NativeTabs.Trigger.Label>Home</NativeTabs.Trigger.Label>
</NativeTabs.Trigger>
<NativeTabs.Trigger name="settings">
<NativeTabs.Trigger.Icon sf="gear" md="settings" />
<NativeTabs.Trigger.Label>Settings</NativeTabs.Trigger.Label>
</NativeTabs.Trigger>
</NativeTabs>
);
}

The sf value references an Apple SF Symbol; md selects the corresponding Android Material icon. The compound NativeTabs.Trigger.Icon and Label API is important: SDK 55 changed this from earlier native-tabs examples.

5. Add two screens and navigate​

src/app/(tabs)/index.tsx:

import { Link } from 'expo-router';
import { Text } from 'react-native';
import { SafeAreaView } from 'react-native-safe-area-context';

export default function HomeScreen() {
return (
<SafeAreaView edges={['top', 'left', 'right']} style={{ flex: 1, padding: 24, gap: 16 }}>
<Text>Home</Text>
<Link push href="/details">Open details</Link>
</SafeAreaView>
);
}

src/app/(tabs)/settings.tsx:

import { Text } from 'react-native';
import { SafeAreaView } from 'react-native-safe-area-context';

export default function SettingsScreen() {
return (
<SafeAreaView edges={['top', 'left', 'right']} style={{ flex: 1, padding: 24 }}>
<Text>Settings</Text>
</SafeAreaView>
);
}

src/app/details.tsx:

import { Text, View } from 'react-native';

export default function DetailsScreen() {
return (
<View style={{ flex: 1, padding: 24 }}>
<Text>Details screen</Text>
</View>
);
}

The tab screens have no stack header, so their safe-area wrappers protect the top and side edges. The SDK 55 default template includes react-native-safe-area-context. Check system insets on each platform; the Details screen retains the root stack header.

Tap Open details to push the Details screen onto the root stack. Switch between Home and Settings to use the platform-native tab bar.

When native tabs are the wrong choice​

Native tabs prioritize platform conventions, so customization is intentionally more limited than with JavaScript tabs. If the product needs a highly branded bar, unusual animations, or matching tab-bar behavior on every platform, evaluate JavaScript tabs instead. This example targets iOS and Android. For a web version, supply a platform-specific tab layout using JavaScript tabs or Expo Router UI; do not assume these native tabs provide the same presentation in a browser.

What else arrived in Router v55?​

The release introduced a more composable native Stack header API and expanded web/server capabilities, including experimental server rendering and data loaders. Those are separate topics worth evaluating when your application needs them; they are not prerequisites for basic file-based navigation.

For route groups, stacks, and parameters in the learning path, see Navigation and Screen Parameters. Its setup may target a different SDK; keep this tutorial’s SDK 55 examples together.

References: SDK 55 Router reference · Expo Router v55 announcement · SDK 55 native tabs reference