Skip to main content

AppBar

Top app bars display navigation, title, and actions at the top of the screen. Follows the Material Design 3 Top App Bar specification.

Usage

import { AppBar } from '@onlynative/components/appbar'

<AppBar title="Home" />

Variants

VariantDescription
smallCompact single-row bar (default)
center-alignedTitle centered in the bar
mediumExpanded two-row bar
largeExpanded with larger title typography

With Back Button

<AppBar
title="Details"
canGoBack
onBackPress={() => navigation.goBack()}
/>

With Actions

<AppBar
title="Inbox"
actions={[
{ icon: 'magnify', accessibilityLabel: 'Search', onPress: () => {} },
{ icon: 'dots-vertical', accessibilityLabel: 'More', onPress: () => {} },
]}
/>

Props

No props found for AppBar.