Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-native-animated-tabbar

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-animated-tabbar

A tab bar with animation effects, written in JS for cross-platform support

  • 0.0.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
8
decreased by-55.56%
Maintainers
1
Weekly downloads
 
Created
Source

#Animated Tabbar

This component is just a combination of React-native-tab-navigator and React-native-animatable in order to add easily animation effects on your Tabbar.

You can choose any of the React-native-animatable animations or the youtube-like pulse animation

It works for both iOS & Android

Inspiration

Highly Inspired by React-native-tab-navigator & React-native-animatable

Install

Make sure that you are in your React Native project directory and run:

npm install react-native-animated-tabbar --save

Usage

Import TabNavigator as a JavaScript module:

import TabNavigator from 'react-native-animated-tabbar';

This is an example of how to use the component and some of the commonly used props that it supports:

<TabNavigator>
  <TabNavigator.Item
    selected={this.state.selectedTab === 'home'}
    title="Home"
    animation="rotate"
    renderIcon={() => <Image source={...} />}
    renderSelectedIcon={() => <Image source={...} />}
    badgeText="1"
    onPress={() => this.setState({ selectedTab: 'home' })}>
    {homeView}
  </TabNavigator.Item>
  <TabNavigator.Item
    selected={this.state.selectedTab === 'profile'}
    title="Profile"
    animation="zoomIn"
    renderIcon={() => <Image source={...} />}
    renderSelectedIcon={() => <Image source={...} />}
    renderBadge={() => <CustomBadgeView />}
    onPress={() => this.setState({ selectedTab: 'profile' })}>
    {profileView}
  </TabNavigator.Item>
</TabNavigator>

See TabNavigatorItem's supported props for more info.

Hiding the Tab Bar

You can hide the tab bar by using styles. For example:

let tabBarHeight = 0;
<TabNavigator
  tabBarStyle={{ height: tabBarHeight, overflow: 'hidden' }}
  sceneStyle={{ paddingBottom: tabBarHeight }}
/>

Props

TabNavigator props

propdefaulttypedescription
sceneStyleinheritedobject (style)define for rendered scene
tabBarStyleinheritedobject (style)define style for TabBar
tabBarShadowStyleinheritedobject (style)define shadow style for tabBar
hidesTabTouchfalsebooleandisable onPress opacity for Tab

TabNavigator Animation props

propdefaulttypedescription
animationDuration500numbertransition time of animation

TabNavigator.Item props

propdefaulttypedescription
renderIconnonefunctionreturns Item icon
renderSelectedIconnonefunctionreturns selected Item icon
badgeTextnonestring or numbertext for Item badge
renderBadgenonefunctionreturns Item badge
titlenonestringItem title
titleStyleinheritedstylestyling for Item title
selectedTitleStylenonestylestyling for selected Item title
tabStyleinheritedstylestyling for tab
selectednonebooleanreturn whether the item is selected
onPressnonefunctiononPress method for Item
allowFontScalingfalsebooleanallow font scaling for title

TabNavigator.Item Animation props

propdefaulttypedescription
animationnonestringOne of animation types from react-native-animatable OR 'youtubePulse'
pulseColor#f4010dstringPulse hex color when animation is youtubePulse

Keywords

FAQs

Package last updated on 29 Mar 2017

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc