Socket
Socket
Sign inDemoInstall

@deliriumproducts/react-native-animated-nav-tab-bar

Package Overview
Dependencies
86
Maintainers
2
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @deliriumproducts/react-native-animated-nav-tab-bar

Animated React Native TabBar Component for React Navigation


Version published
Weekly downloads
2
decreased by-60%
Maintainers
2
Install size
9.53 MB
Created
Weekly downloads
 

Readme

Source

npm version contributions welcome HitCount npm

react-native-animated-nav-tab-bar

A simple and customisable React Native component that implements an animated bottom tab bar for React Navigation.

  • Support for iPhoneX

Preview

Prerequisites

❗️In order to use the component, you need to have React Navigation installed

Installation

If using yarn

yarn add react-native-animated-nav-tab-bar

If using npm

npm install react-native-animated-nav-tab-bar

Usage

import { TabBar } from "react-native-animated-nav-tab-bar";

Simply place a <TabBar /> tag in the tabBar in the configuration option object of the navigation function

...

const Tabs = createBottomTabNavigator();

export default () => (
  <Tabs.Navigator
    tabBarOptions={{
      activeTintColor: "#2F7C6E",
      inactiveTintColor: "#222222"
    }}
    tabBar={props => (
      <TabBar
        activeColors={['#e6b580', '#8e87d6', '#c095c9']} // or activeColors={'#e6b580'}
        activeTabBackgrounds={['#ede7e6', '#eae3f6', '#eae4f6']} // or activeTabBackgrounds={'#ede7e6'}
        {...props}
      />
    )}
  >
  </Tabs.Navigator>

Add icons to your Bottom Navigation To use this, you need react-native-vector-icons

Example

import Icon from 'react-native-vector-icons/Feather';
...

export default () =>
  <Tabs.Navigator
    tabBarOptions={{
      activeTintColor: "#2F7C6E",
      inactiveTintColor: "#222222"
    }}
    tabBar={props => (
      <TabBar
        activeColors={"#2F7C6E"}
        activeTabBackgrounds={"#DFF7F6"}
        {...props}
      />
    )}
  >
    <Tabs.Screen
      name="Home"
      component={Home}
      options={{
        tabBarIcon: ({ focused, color, size }) => (
            <Icon
                name="Home"
                size={size ? size : 24}
                color={focused ? color : "#222222"}
                focused={focused}
                color={color}
            />
        )
      }}
    />
    </Tabs.Navigator>
...

Documentation

TabBar Component

NameDescriptionDefaultType
activeTabBackgroundColor of active tab backgorund#E4F7F7String
tabBarBackgroundBackgorund color for the wrapper that contains the navigation tabs#FFFFFFString
shadowIf set to true, the wrapper has a light shadowtrueBool
verticalPaddingVertical space between for the tab buttons10Number
topPaddingSpace between the tab button and the wrapper (top)10Number

Contributing

Pull requests are always welcome! Feel free to open a new GitHub issue for any changes that can be made.

Working on your first Pull Request? You can learn how from this free series How to Contribute to an Open Source Project on GitHub

Author

Catalin Torge @torgeadelin

License

MIT

Keywords

FAQs

Last updated on 14 Feb 2020

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc