Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Navigation Bar - React Native

I am creating a mobile application with React Native and I decided to use a navigation bar that comes from the site 'https://github.com/beefe/react-native-navigation-bar', but I do not know how to use it in my code.

I would like you to send me examples of the navigation bar of the site 'https://github.com/beefe/react-native-navigation-bar'.

like image 734
jvrodriguesx Avatar asked Mar 02 '26 10:03

jvrodriguesx


1 Answers

This document is clearly shows how to use this component. Just 2 steps:

  1. Install package.

     npm install react-native-navigation-bar --save
    
  2. Import and use. Change attributes the way you like.

    import React, { Component } from 'react';
    import { Text, View } from 'react-native';
    
    import NavigationBar from 'react-native-navigation-bar';
    
    export default class Example extends Component {
      render() {
        return (
          <View>
            <NavigationBar 
              title='Main title'
              height={50}
              leftButtonTitle='back'
              rightButtonTitle='forward'
            />
            <Text>ABC</Text>
          </View>
        );
      }
    }
    
like image 150
Nguyên Hoàng Avatar answered Mar 05 '26 04:03

Nguyên Hoàng



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!