Skip to content

Tab navigator

Tab renders a bottom tab bar and switches between a fixed set of screens declared as <Tab.Screen> children. Unlike Stack, which drives native react-native-screens push/pop transitions and keeps every pushed route alive in memory, Tab paints its bar with ordinary View/Text primitives in JS — there is no native tab-bar component underneath.

A Tab navigator’s route set is fixed at mount time — whatever <Tab.Screen>s you declare — so there is no push/pop, only jumpTo between the existing tabs.

import { Tab } from '@symbiote-native/navigation/react';
export function TabsDemoScreen() {
return (
<Tab initialRouteName="Home">
<Tab.Screen
name="Home"
component={TabHomeScreen}
options={{ tabBarLabel: 'Home', tabBarIcon: '🏠', tabBarActiveTintColor: '#4fd1a5' }}
/>
<Tab.Screen
name="Search"
component={TabSearchScreen}
options={{ tabBarLabel: 'Search', tabBarIcon: '🔍', tabBarBadge: 3 }}
/>
</Tab>
);
}

tabBarStyle styles the tab bar container itself; tabBarActiveTintColor/ tabBarInactiveTintColor tint the focused/unfocused label and icon. All three can be set per-tab in options or shared across every tab via screenOptions:

<Tab
screenOptions={{
tabBarStyle: { backgroundColor: '#101018', borderTopColor: '#26263a' },
tabBarActiveTintColor: '#4fd1a5',
tabBarInactiveTintColor: '#8e8e93',
}}
>
{/* ...Tab.Screen children... */}
</Tab>

ITabNavigatorHandle — the shape of the object every adapter exposes (a forwarded ref in React, expose() in Vue, the Tab class itself in Angular):

Method Signature Description
jumpTo (name: string, params?: unknown) => void Moves focus to the tab route named name. Never adds, removes, or reorders tabs
setParams (params: unknown, key: string) => void Merges params into the route matched by key. key is required here, unlike Stack’s setParams, whose key defaults to the focused route

ITabOptions — passed as options on a single <Tab.Screen> (or screenOptions on <Tab> for every tab at once; a screen’s own options win on a per-field basis):

Option Type Description
title string Fallback label used when tabBarLabel is unset
tabBarLabel string Explicit tab bar label text
tabBarIcon IDescriptor | string Tab icon: a pre-built descriptor node, or a bare string rendered as a label-style glyph (e.g. an emoji). Not a render-prop callback
tabBarBadge string | number Badge value shown on the tab icon
tabBarActiveTintColor color Tint color for the label/icon when the tab is focused (site default #007AFF)
tabBarInactiveTintColor color Tint color for the label/icon when unfocused (site default #8e8e93)
tabBarStyle style object Style override for the tab bar container

Because Tab remounts a screen’s component on every focus switch, useIsFocused() and useFocusEffect() (Angular: injectIsFocused()/injectFocusEffect()) are the tools for reacting to a tab regaining or losing focus without relying on mount/unmount timing. To combine push/pop transitions with a tab bar — a Stack nested inside a Tab screen, or a Tab nested inside a Stack screen — see Stack navigator.