This documentation is available as Markdown for AI agents and LLMs. See the full Markdown index or append .md to any documentation URL.
TopAppBar
A Jetpack Compose TopAppBar component for displaying a title, a navigation icon, and actions at the top of a screen.
Expo UI TopAppBar matches the official Jetpack Compose TopAppBar API. It displays a title, a navigation icon, and action buttons at the top of a screen.
Installation
If you are installing this in an existing React Native app, make sure to install expo in your project.
Usage
Basic top app bar
Put content in the TopAppBar.Title, TopAppBar.NavigationIcon, and TopAppBar.Actions slots. Each slot is optional. Set style={{ typography: 'titleLarge' }} on the title Text to use Material 3 title typography.
Window insets
By default, the app bar adds the status bar height above its content. It also adds any system bar or display cutout inset at its sides. These insets assume the bar is at the top edge of the window, even inside a nested Host. If a parent view already handles the insets, pass windowInsets={{}}. This removes both the top and horizontal insets.
API
import { TopAppBar } from '@expo/ui/jetpack-compose';
Component
Type: React.Element<TopAppBarProps>
A Material 3 small top app bar that shows a title, a navigation icon, and actions.
ReactNodeTopAppBar.Title, TopAppBar.NavigationIcon, and TopAppBar.Actions slots.
TopAppBarColorsColors for the app bar. Unset colors use TopAppBarDefaults.topAppBarColors().
PaddingValuesRecordInsets in dp that the app bar adds around its content. Missing sides are 0.
When omitted, the app bar uses TopAppBarDefaults.windowInsets, which assumes
the bar is at the top edge of the window, even inside a nested Host.
Pass {} when a parent handles the insets. This removes both the top status
bar inset and the horizontal system bar and display cutout insets.