Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
c3aef33
refactor(navigation-bar): extract module + deprecate Bar alias
burczu Jun 17, 2026
e0da53e
feat(navigation-bar): apply MD3 token-based colors and sizing
burczu Jun 17, 2026
b384ecb
refactor(navigation-bar): remove MD2 shifting mode from the bar
burczu Jun 17, 2026
33bdcb9
feat(navigation-bar): add visible MD3 state layers
burczu Jun 17, 2026
f16775a
feat(navigation-bar): drive motion from tokens and spring the indicator
burczu Jun 17, 2026
c56ceff
feat(navigation-bar): add flexible horizontal variant
burczu Jun 17, 2026
39b2f82
docs(navigation-bar): add example and update JSDoc
burczu Jun 17, 2026
98346d3
fix(navigation-bar): restore labels and active indicator on tab change
burczu Jun 17, 2026
4076ce8
test(navigation-bar): drop redundant shifting test variants
burczu Jun 17, 2026
57d7506
test(navigation-bar): add characterization tests before refactor
burczu Jun 18, 2026
6937a17
refactor(navigation-bar): collapse cross-fade, dedupe item render
burczu Jun 18, 2026
b19e402
refactor(navigation-bar): unify color source on colorRoles
burczu Jun 18, 2026
83b1a8b
docs(navigation-bar): register NavigationBar page, fix docs build
burczu Jun 18, 2026
2057612
refactor(navigation-bar): drop deprecations per review
burczu Jun 18, 2026
8fe9cf7
refactor(navigation-bar): migrate motion to reanimated
burczu Jun 18, 2026
4e9a651
fix(tests): migrate BottomNavigation tests to RNTL v14 patterns
burczu Jul 3, 2026
fb3c953
fix(docs): fix CI build for NavigationBar as top-level component
burczu Jul 3, 2026
c1bf911
refactor(navigation-bar): remove BottomNavigation scene wrapper
burczu Jul 3, 2026
0d49772
Merge branch 'main' of https://github.com/callstack/react-native-pape…
MikitasK Aug 27, 2026
c9fc66a
fix: address MD3 expressive layout issues
MikitasK Aug 27, 2026
e6bd72c
fix: align with M3 tokens and aria semantics
MikitasK Aug 28, 2026
a01e439
Merge branch 'main' of https://github.com/callstack/react-native-pape…
MikitasK Sep 5, 2026
4c0b60a
fix(navigation-bar): type `style` as StyleProp<ViewStyle>
MikitasK Sep 5, 2026
07be96e
fix(navigation-bar): drop the default testID
MikitasK Sep 5, 2026
3281245
docs: document the BottomNavigation removal in the v6 migration guide
MikitasK Sep 5, 2026
b47d0d8
chore: sync navigation bar branch with main
MikitasK Sep 21, 2026
55913bc
fix: update migration docs and tab press API
MikitasK Sep 21, 2026
a92737a
fix: address review feedback on MD3 navigation bar
MikitasK Oct 27, 2026
89298cf
docs: rename the guide & refresh docs data
MikitasK Oct 27, 2026
1a5bf26
style: name pressed route in tab press handlers
MikitasK Oct 27, 2026
995cecd
refactor: remove the unused useLazyRef hook
MikitasK Nov 4, 2026
2227ffc
docs: cover bar test ID and unmounted screens
MikitasK Nov 4, 2026
e37fcfb
Merge branch 'main' into feat/navigation-bar-md3
jacekAtCK Nov 19, 2026
6695dd4
fix(navigation-bar): let TalkBack focus tabs by touch on Android
jacekAtCK Nov 27, 2026
2142b24
Merge remote-tracking branch 'upstream/main' into feat/navigation-bar…
jacekAtCK Nov 27, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/6.x/docs/guides/_meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"recommended-libraries",
"contributing",
"theming-with-react-navigation",
"bottom-navigation",
"navigation-bar",
"react-navigation",
"rtl",
"ripple-effect",
Expand Down
86 changes: 80 additions & 6 deletions docs/6.x/docs/guides/migration.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,7 @@ Hardcoded default test IDs have been removed for the components listed below:
- `AnimatedFAB`: `animated-fab`
- `Appbar.Content`: `appbar-content`
- `Appbar.Header`: `appbar-header`
- `BottomNavigation`: `bottom-navigation`
- `BottomNavigation.Bar`: `bottom-navigation-bar`
- `BottomNavigation` and `BottomNavigation.Bar`: `bottom-navigation` and `bottom-navigation-bar`. Both components are removed, see [BottomNavigation](#bottomnavigation).
- `Button`: `button`
- `Card`: `card`
- `Chip`: `chip`
Expand All @@ -185,7 +184,6 @@ If you were relying on internal test IDs, update your tests not to rely on inter

Some components now accept explicit `testID` props for their interactable elements:

- `BottomNavigation`: `barTestID` for the internal `BottomNavigation.Bar`, replacing the previous `${testID}-bar` derivation.
- `Chip`: `closeIconTestID` for the close icon button.
- `Dialog` and `Modal`: `overlayTestID` for the overlay displayed behind the content.
- `Menu`: `overlayTestID` for the overlay displayed behind the menu.
Expand Down Expand Up @@ -412,7 +410,7 @@ Components now use React Native's `aria-*` props and `role` instead of the `acce

Props that label a part of a component keep their names, e.g. `closeIconAccessibilityLabel` on `Chip` and `dismissAccessibilityLabel` on `Modal`.

Keys inside data objects changed the same way: the `routes` of `BottomNavigation` and the `buttons` of `SegmentedButtons` now take `'aria-label'`. The old `accessibilityLabel` key is ignored, and TypeScript doesn't report it in `routes`.
Keys inside data objects changed the same way: the `routes` of `NavigationBar` (`BottomNavigation` in 5.x) and the `buttons` of `SegmentedButtons` now take `'aria-label'`. The old `accessibilityLabel` key is ignored, and TypeScript doesn't report it in `routes`.

```diff
<Checkbox.Item
Expand Down Expand Up @@ -465,7 +463,7 @@ Interactive components now draw the Material Design 3 keyboard focus indicator:

`Snackbar` rings its action and close button in `theme.colors.inversePrimary`, the color of its action label, because `secondary` barely shows on its `inverseSurface` background. If a component's background is the ring color, such as an `Appbar` with a `secondary` background, the rings of the controls on it don't show: give those controls a `theme` with a contrasting `secondary`. `Appbar.Action`, `Appbar.BackAction` and `Appbar.Content` read the `theme` of the `Appbar` they are rendered in from context, and the actions get it inside a `Tooltip` or a `View` too, so you can give that `theme` to the `Appbar` instead of to each control. See [Parts read from the `Appbar`](#parts-read-from-the-appbar).

Components that fill a clipping container or touch their neighbours draw the ring 3dp inside their edge instead: `List.Item`, `List.Accordion`, `Checkbox.Item`, `RadioButton.Item`, `Menu.Item`, the `FAB.Menu` items, `Drawer.Item`, the `BottomNavigation` tabs, `DataTable.Row`, `DataTable.Cell`, `DataTable.Title` and `SegmentedButtons`. `Drawer.CollapsedItem` draws it around its icon and label, 2dp clear of the active indicator. `FAB` and `Switch` draw this ring instead of their own, and `Checkbox` keeps its circular ring around the state layer.
Components that fill a clipping container or touch their neighbours draw the ring 3dp inside their edge instead: `List.Item`, `List.Accordion`, `Checkbox.Item`, `RadioButton.Item`, `Menu.Item`, the `FAB.Menu` items, `Drawer.Item`, the `NavigationBar` tabs, `DataTable.Row`, `DataTable.Cell`, `DataTable.Title` and `SegmentedButtons`. `Drawer.CollapsedItem` draws it around its icon and label, 2dp clear of the active indicator. `FAB` and `Switch` draw this ring instead of their own, and `Checkbox` keeps its circular ring around the state layer.

A `TouchableRipple`, and every component built on it, rings only while it can be pressed. A disabled one shows no ring. One with no touch handler and no `disabled` is the plain view described in [TouchableRipple without a press handler](#touchableripple-without-a-press-handler): it isn't a keyboard stop, so it never rings. This applies to `TouchableRipple` only: a `Drawer.CollapsedItem` without `onPress` is still a keyboard stop and rings. A `Switch` without `onValueChange` is read-only, so it isn't a keyboard stop and never rings, as [Switches without `onValueChange`](#switches-without-onvaluechange) explains.

Expand Down Expand Up @@ -637,6 +635,82 @@ e.g.:
+ </View>
```

### BottomNavigation

`BottomNavigation` has been removed. Paper no longer ships a component that owns your tab scenes; the Material 3 navigation bar is now `NavigationBar`, a standalone bar you render next to your own navigator (React Navigation, or your own state).

| v5 | v6 |
| --------------------------------------------------------------------- | ------------------------------------------------------------------------ |
| `BottomNavigation`, `BottomNavigation.Bar` | `NavigationBar` |
| `BottomNavigationProps`, `BottomNavigationRoute` | `NavigationBarProps`, `NavigationBarRoute` |
| `BottomNavigation.SceneMap`, `renderScene`, `onIndexChange` | render the active scene yourself, alongside the bar |
| `getLazy`, `route.lazy` | removed (the bar no longer owns the scenes) |
| `sceneAnimationEnabled`, `sceneAnimationType`, `sceneAnimationEasing` | removed with the scene container |
| `shifting` | removed (including the active-icon shift and inactive-label transitions) |
| `barStyle` | `style` |

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In v5 style styled the whole BottomNavigation container and now it styles the bar, which should be in the table. A line about the height change from 80 to 64dp would also help apps that offset a FAB or Snackbar by it.

| `style` (the whole `BottomNavigation`, scenes and bar) | wrap your scenes and the bar in your own `View` (`style` styles the bar) |
| `animationEasing` | removed (the indicator uses M3 motion from the theme) |
| `barStyle` with `Animated.Value` | `style` with static styles only |
| `barTestID`, `${testID}-bar` | `testID` on `NavigationBar` |
| n/a | new `variant` (`'stacked' \| 'horizontal'`) for the item layout |

The bar is 64dp tall instead of 80dp, which is the height of the M3 flexible navigation bar. If your app moves a `FAB` or a `Snackbar` up by the height of the bar, change that offset. The label of the active tab uses `secondary` instead of `onSurface`.

```diff
+ const scenes = { home: HomeScreen, settings: SettingsScreen };
+ const ActiveScene = scenes[routes[index].key];
+
- <BottomNavigation
- navigationState={{ index, routes }}
- onIndexChange={setIndex}
- renderScene={BottomNavigation.SceneMap(scenes)}
- />
+ <>
+ <ActiveScene />
+ <NavigationBar
+ navigationState={{ index, routes }}
+ onTabPress={({ route }) => setIndex(routes.findIndex((r) => r.key === route.key))}
+ />
+ </>
```

This renders only the active route, so a screen unmounts when you leave its tab, unlike v5 which kept the visited screens mounted. If your app depends on that state, render `NavigationBar` as the [`tabBar` of React Navigation's bottom tabs](./navigation-bar#quick-example), which keeps screens mounted.

`onTabPress` & `onTabLongPress` callbacks receive only pressed `route`. The v5 event object also carried `preventDefault()` & `defaultPrevented`, so code that reads them now throws `preventDefault is not a function`. The bar never navigates on its own, so navigator's own `tabPress` event decides whether press is handled:

```diff
tabBar={({ navigation, state, descriptors, insets }) => (
<NavigationBar
navigationState={state}
safeAreaInsets={insets}
- onTabPress={({ route, preventDefault }) => {
+ onTabPress={({ route }) => {
const event = navigation.emit({
type: 'tabPress',
target: route.key,
canPreventDefault: true,
});

- if (event.defaultPrevented) {
- preventDefault();
- } else {
+ if (!event.defaultPrevented) {
navigation.dispatch({
...CommonActions.navigate(route.name, route.params),
target: state.key,
});
}
}}
/>
)}
```

The `animationEasing` prop is gone along with animation it configured. Active indicator now follows the motion from theme (`theme.motion`) and honors reduce motion preference.

Unlike v5 `barStyle`, the `style` prop no longer accepts `Animated.Value` or `Animated.AnimatedInterpolation`. Pass static styles.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that mentioning v5 and its behavior is completely redundant except direct comparison before vs after. Imo migration should only describe the current behavior and implementation so we could drop these mentions. What do you think?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agreed for this line. I'd keep the table and the snippets though - people... or agents 😄 read this guide when they move from v5 so they need to see what to change. wdyt?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, the table should definitely stay like before vs after snippets!


`NavigationBar` also does not set a default `testID`. If your tests looked up `bottom-navigation-bar` (or its `-container` / `-content` / `-content-wrapper` children), pass a `testID` explicitly.
Comment thread
jacekAtCK marked this conversation as resolved.
Resolved

### Surface

- The `elevation` prop no longer accepts a React Native `Animated.Value`. Any `elevation` changes are animated automatically.
Expand Down Expand Up @@ -2124,7 +2198,7 @@ const TertiarySwitch = ({

`Icon`'s `source` prop is typed as `IconSource` instead of `any`, so a value that isn't an icon name, an image source or a render function, such as a boolean or `undefined`, is now a type error. `Icon` still renders nothing for those values.

If you pass a field that can be `undefined`, such as an optional `focusedIcon` on a route in `BottomNavigation`'s `renderIcon`, check it first:
If you pass a field that can be `undefined`, such as an optional `focusedIcon` on a route in `NavigationBar`'s `renderIcon`, check it first:

```diff
-renderIcon={({ route, color }) => (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,27 +1,25 @@
---
title: Using BottomNavigation with React Navigation
title: Using NavigationBar with React Navigation
---

Build a Material Design bottom tab bar by combining two pieces:

- `@react-navigation/bottom-tabs` handles routing, state, and screen options.
- `BottomNavigation.Bar` renders the Material 3 tab bar (ripple, badges, shifting/labeled modes).

<img src="/react-native-paper/screenshots/material-bottom-tabs.gif" style={{ width: '420px', maxWidth: '100%', margin: '16px 0' }} />
- `NavigationBar` renders the Material 3 navigation bar (state layers, badges, and stacked or horizontal item layouts).

:::info
Install [`@react-navigation/native`](https://reactnavigation.org/docs/getting-started) and [`@react-navigation/bottom-tabs`](https://reactnavigation.org/docs/bottom-tab-navigator) first.
:::

## Quick example

Pass a `BottomNavigation.Bar` to the navigator's `tabBar` prop. The bar reads navigation state and dispatches `tabPress` events back:
Pass a `NavigationBar` to the navigator's `tabBar` prop. The bar reads navigation state and dispatches `tabPress` events back:

```tsx
import MaterialCommunityIcons from '@react-native-vector-icons/material-design-icons';
import { createBottomTabNavigator } from '@react-navigation/bottom-tabs';
import { CommonActions } from '@react-navigation/native';
import { BottomNavigation } from 'react-native-paper';
import { NavigationBar } from 'react-native-paper';
import { useSafeAreaInsets } from 'react-native-safe-area-context';

const Tab = createBottomTabNavigator();
Expand All @@ -31,20 +29,17 @@ function MyTabs() {

return (
<Tab.Navigator
screenOptions={{ animation: 'shift' }}
tabBar={({ navigation, state, descriptors }) => (
<BottomNavigation.Bar
<NavigationBar
navigationState={state}
safeAreaInsets={insets}
onTabPress={({ route, preventDefault }) => {
onTabPress={({ route }) => {
const event = navigation.emit({
type: 'tabPress',
target: route.key,
canPreventDefault: true,
});
if (event.defaultPrevented) {
preventDefault();
} else {
if (!event.defaultPrevented) {
navigation.dispatch({
...CommonActions.navigate(route.name, route.params),
target: state.key,
Expand Down
2 changes: 1 addition & 1 deletion docs/6.x/docs/guides/theming.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -592,7 +592,7 @@ Now you can use your `FancyButton` component everywhere instead of using `Button
## Dark Theme

Since 3.0 we adapt dark theme to follow [Material design guidelines](https://material.io/design/color/dark-theme.html). <br/>
In contrast to light theme, dark theme by default uses `surface` colour instead of `primary` on large components like `Appbar` or `BottomNavigation`.<br/>
In contrast to light theme, dark theme by default uses `surface` colour instead of `primary` on large components like `Appbar` or `NavigationBar`.<br/>
The dark theme adds a white overlay with opacity depending on elevation of surfaces. It uses it for the better accentuation of surface elevation. Using only shadow is highly imperceptible on dark surfaces.

If you don't use a custom theme, Paper will automatically change between the default theme and the default dark theme, depending on device settings.
Expand Down
7 changes: 3 additions & 4 deletions docs/component-docs.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,6 @@ const pages = {
},
Badge: 'Badge',
Banner: 'Banner',
BottomNavigation: {
BottomNavigation: 'BottomNavigation/BottomNavigation',
BottomNavigationBar: 'BottomNavigation/BottomNavigationBar',
},
Button: {
Button: 'Button/Button',
},
Expand Down Expand Up @@ -110,6 +106,9 @@ const pages = {
MenuItem: 'Menu/MenuItem',
},
Modal: 'Modal',
NavigationBar: {
NavigationBar: 'NavigationBar/NavigationBar',
},
Comment thread
jacekAtCK marked this conversation as resolved.
Resolved
Portal: {
Portal: {
source: 'Portal/Portal',
Expand Down
Binary file added docs/public/screenshots/navigation-bar.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 2 additions & 5 deletions docs/src/data/extendedExamples.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
import {
dynamicCode,
staticCode,
} from './extendedExamples/BottomNavigationBar.ts';
import { dynamicCode, staticCode } from './extendedExamples/NavigationBar.ts';

export const extendedExamples = {
'BottomNavigation.Bar': {
NavigationBar: {
'with React Navigation': {
static: staticCode,
dynamic: dynamicCode,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export const staticCode = `import { Text, View } from 'react-native';
import { createBottomTabNavigator } from '@react-navigation/bottom-tabs';
import { Provider, BottomNavigation } from 'react-native-paper';
import { Provider, NavigationBar } from 'react-native-paper';
import MaterialCommunityIcons from '@react-native-vector-icons/material-design-icons';
import {
CommonActions,
Expand All @@ -24,23 +24,18 @@ function SettingsScreen() {
}

const MyTabs = createBottomTabNavigator({
screenOptions: {
animation: 'shift',
},
tabBar: ({ navigation, state, descriptors, insets }) => (
<BottomNavigation.Bar
<NavigationBar
navigationState={state}
safeAreaInsets={insets}
onTabPress={({ route, preventDefault }) => {
onTabPress={({ route }) => {
const event = navigation.emit({
type: 'tabPress',
target: route.key,
canPreventDefault: true,
});

if (event.defaultPrevented) {
preventDefault();
} else {
if (!event.defaultPrevented) {
navigation.dispatch({
...CommonActions.navigate(route.name, route.params),
target: state.key,
Expand Down Expand Up @@ -102,7 +97,7 @@ export default function App() {
export const dynamicCode = `import { Text, View } from 'react-native';
import { NavigationContainer, CommonActions } from '@react-navigation/native';
import { createBottomTabNavigator } from '@react-navigation/bottom-tabs';
import { Provider, BottomNavigation } from 'react-native-paper';
import { Provider, NavigationBar } from 'react-native-paper';
import MaterialCommunityIcons from '@react-native-vector-icons/material-design-icons';

function HomeScreen() {
Expand All @@ -128,23 +123,18 @@ export default function App() {
<Provider>
<NavigationContainer>
<Tab.Navigator
screenOptions={{
animation: 'shift',
}}
tabBar={({ navigation, state, descriptors, insets }) => (
<BottomNavigation.Bar
<NavigationBar
navigationState={state}
safeAreaInsets={insets}
onTabPress={({ route, preventDefault }) => {
onTabPress={({ route }) => {
const event = navigation.emit({
type: 'tabPress',
target: route.key,
canPreventDefault: true,
});

if (event.defaultPrevented) {
preventDefault();
} else {
if (!event.defaultPrevented) {
navigation.dispatch({
...CommonActions.navigate(route.name, route.params),
target: state.key,
Expand Down
3 changes: 1 addition & 2 deletions docs/src/data/screenshots.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ export const screenshots = {
dot: 'screenshots/badge-3.png',
},
Banner: 'screenshots/banner.gif',
BottomNavigation: 'screenshots/bottom-navigation.gif',
'BottomNavigation.Bar': 'screenshots/bottom-navigation-tabs.jpg',
Button: {
filled: 'screenshots/button-3.png',
tonal: 'screenshots/button-5.png',
Expand Down Expand Up @@ -112,6 +110,7 @@ export const screenshots = {
},
'Menu.Item': 'screenshots/menu-item.png',
Modal: 'screenshots/modal.gif',
NavigationBar: 'screenshots/navigation-bar.png',
ProgressBar: 'screenshots/progress-bar.png',
RadioButton: {
'Android (enabled)': 'screenshots/radio-enabled.android.png',
Expand Down
5 changes: 5 additions & 0 deletions docs/src/data/versionRouteFallbacks.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
"next": {
"/docs/components/BottomNavigation/BottomNavigation": "/6.x/docs/components/NavigationBar/NavigationBar",
"/docs/components/BottomNavigation/BottomNavigationBar": "/6.x/docs/components/NavigationBar/NavigationBar",
"/docs/components/Checkbox/CheckboxAndroid": "/6.x/docs/components/Checkbox/Checkbox",
"/docs/components/Checkbox/CheckboxIOS": "/6.x/docs/components/Checkbox/Checkbox",
"/docs/components/Dialog/DialogActions": "/6.x/docs/components/Dialog/Dialog",
Expand All @@ -14,12 +16,15 @@
"/docs/components/ToggleButton/ToggleButton": "/6.x/docs/guides/migration#togglebutton",
"/docs/components/ToggleButton/ToggleButtonGroup": "/6.x/docs/guides/migration#togglebutton",
"/docs/components/ToggleButton/ToggleButtonRow": "/6.x/docs/guides/migration#togglebutton",
"/docs/guides/bottom-navigation": "/6.x/docs/guides/navigation-bar",
"/docs/guides/migration-guide-to-5.0": "/6.x/docs/guides/migration"
},
"stable": {
"/6.x/docs/components/FAB/FABExtended": "/docs/components/FAB/FAB",
"/6.x/docs/components/FAB/FABMenu": "/docs/components/FAB/FAB",
"/6.x/docs/components/NavigationBar/NavigationBar": "/docs/components/BottomNavigation/BottomNavigationBar",
"/6.x/docs/guides/migration": "/docs/guides/migration-guide-to-5.0",
"/6.x/docs/guides/navigation-bar": "/docs/guides/bottom-navigation",
"/6.x/docs/guides/rtl": "/"
}
}
Loading
Loading