This documentation is available as Markdown for AI agents and LLMs. See the full Markdown index or append .md to any documentation URL.

Expo NavigationBar

A library that provides access to various interactions with the native navigation bar on Android.

Android
Included in Expo Go
Recommended version:
~55.0.17

expo-navigation-bar enables you to modify and observe the native navigation bar on Android devices. Due to some Android platform restrictions, parts of this API overlap with the expo-status-bar API.

The APIs in this package have no impact when "Gesture Navigation" is enabled on the Android device. There is currently no native Android API to detect if "Gesture Navigation" is enabled or not.

Installation

Terminal
- npx expo install expo-navigation-bar
- yarn expo install expo-navigation-bar
- pnpm expo install expo-navigation-bar
- bun expo install expo-navigation-bar

If you are installing this in an existing React Native app, make sure to install expo in your project.

Configuration in app config

You can configure expo-navigation-bar using its built-in config plugin if you use config plugins in your project (Continuous Native Generation (CNG)). The plugin allows you to configure various properties that cannot be set at runtime and require building a new app binary to take effect. If your app does not use CNG, then you'll need to manually configure the library.

Example app.json with config plugin

app.json
{ "expo": { "plugins": [ [ "expo-navigation-bar", { "enforceContrast": true, "barStyle": "light", "visibility": "visible" } ] ] } }

Configurable properties

NameDefaultDescription
enforceContrasttrue

Determines whether the operating system should keep the navigation bar translucent to provide contrast between the navigation buttons and app content.

barStyleundefined

Controls whether Android renders light or dark navigation bar buttons. Accepts light and dark as values.

visibilityundefined

Determines whether the navigation bar starts visible or hidden. Accepts visible to show the bar immediately and hidden to hide it until the user reveals it with a system gesture.

Are you using this library in an existing React Native app?

If you're not using Continuous Native Generation (CNG) or you're using a native android project manually, then you need to add the following configuration to your native project:

  • To apply visibility to the navigation bar, add expo_navigation_bar_visibility to android/app/src/main/res/values/strings.xml:

    <resources> <!-- ... --> <string name="expo_navigation_bar_visibility" translatable="false">visible</string> </resources>

API

import * as NavigationBar from 'expo-navigation-bar';

No API data file found, sorry!