Header Bar
Mobile screen navigation bar with back action, title, subtitle, and right action button.
v0.3.1NativeWindStyleSheetiOSAndroidExpo GoWeb
Preview
Installation
npx nativra-cli add header-barWrites HeaderBar.tsx to components/ui, rewrites imports to your aliases and records hashes in nativra.lock.json, along with 1 registry dependency. Existing files are never overwritten without asking.
Want to try it first? Open it in the playground: a real React Native project in your browser, with this item installed by the CLI.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| title | string | required | Centered primary screen title |
| subtitle | string | undefined | Optional secondary subtitle below title |
| onBack | () => void | undefined | Renders leading Back button when provided |
| rightLabel | string | undefined | Trailing action button label |
| onRightPress | () => void | undefined | Callback for trailing action button |
Source
Exactly what the CLI writes, before your import aliases are applied.