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 NavigationBar 与官方 Jetpack Compose NavigationBar API 保持一致。它显示一行目的地,用于在应用的顶级部分之间切换。


安装
If you are installing this in an existing React Native app, make sure to install expo in your project.
使用
基础导航栏
在 React state 中管理选中项,并将 selected 传递给每个 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.