- NativeBase component that renders as Header (navbar) for your screen.
- There can be a single Header component into your Container.
- To have Header for your screen, include
Headercomponent withinContainer. - Header takes input as:
Left,BodyandRight. - The components those are defined within
Headerwill be rendered in the same order that you define them. - Header provides you with stylesheet.
- User can add custom styles while defining
Headerwithin their app. - Replacing Component: React Native View
Contents:
- Header with only title
- Header with Title and Subtitle
- Header with Icon Buttons
- Header with Text Buttons
- Header with Icon Button and Text Button
- Header with Icon and Text Button
- Header with Multiple Icon Button
- Header Span
- Header No Shadow
- Header No Left
- Header Transparent
Syntax {% codetabs name="React Native", type="js" -%} import React, { Component } from 'react'; import { Container, Header, Left, Body, Right, Button, Icon, Title } from 'native-base'; export default class HeaderExample extends Component { render() { return (
<Title>Header</Title> ); } } {%- language name="Vue Native", type="vue" -%} Header {%- endcodetabs %}Configuration
| Property | Default | Option | Description |
|---|---|---|---|
| Left | - | - | Components render to the left in Header |
| Body | - | - | Components render at the center of Header |
| Right | - | - | Components render to the right in Header |
| iosBarStyle | - | light-content, dark-content, default | Set iOS barStyle |
| androidStatusBarColor | - | - | Set background color for status bar in android |
| noShadow | - | boolean | Removes elevation from android |
| searchBar | - | boolean | Add searchbar to header or not |
| rounded | - | boolean | Make header searchbar rounded |
| hasSubtitle | - | boolean | Add subtitle to header |
| hasSegment | - | boolean | Add segments to header |
| hasTabs | - | boolean | Add tabs to header |
| hasText | - | boolean | This is button prop. Adds necessary padding when Text button defined in Left / Right of Header (iOS) |
| noLeft | - | boolean | Eliminates Left component and moves Title towards left (Android) |
| span | - | boolean | Doubles the header size |

