This documentation is available as Markdown for AI agents and LLMs. See the full Markdown index or append .md to any documentation URL.
NavigationBar
适用于 Material 3 底部导航的 Jetpack Compose NavigationBar 组件。
Expo UI 导航栏与官方 Jetpack Compose NavigationBar API 相匹配。它显示一行目的地,用于在应用的顶层部分之间切换。
🌐 Expo UI NavigationBar matches the official Jetpack Compose NavigationBar API. It displays a row of destinations for switching between top-level app sections.


安装
🌐 Installation
If you are installing this in an existing React Native app, make sure to install expo in your project.
用法
🌐 Usage
基础导航栏
🌐 Basic navigation bar
在 React 状态中管理所选项目,并将 selected 传递给每个 NavigationBarItem。
🌐 Manage the selected item in React state and pass selected to each NavigationBarItem.
应用接口
🌐 API
import { NavigationBar, NavigationBarItem, } from '@expo/ui/jetpack-compose';
Components
Type: React.Element<NavigationBarProps>
A Material Design 3 navigation bar.
ColorValue • Default: NavigationBarDefaults.containerColorBackground color of the navigation bar.
ColorValue • Default: contentColorFor(containerColor)Preferred content color inside the navigation bar.
Type: React.Element<NavigationBarItemProps>
A Material Design 3 navigation bar item. Must be used inside NavigationBar.
Types
Components
Type: React.Element<NavigationBarProps>
A Material Design 3 navigation bar.
ColorValue • Default: NavigationBarDefaults.containerColorBackground color of the navigation bar.
ColorValue • Default: contentColorFor(containerColor)Preferred content color inside the navigation bar.
Type: React.Element<NavigationBarItemProps>
A Material Design 3 navigation bar item. Must be used inside NavigationBar.