Socket
Socket
Sign inDemoInstall

react-native-tab-bar-footer

Package Overview
Dependencies
516
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    react-native-tab-bar-footer

Navigation tab bar footer component with animation


Version published
Weekly downloads
9
increased by28.57%
Maintainers
1
Install size
438 kB
Created
Weekly downloads
 

Readme

Source

npm version npm version

Navigation TabBar footer component for IOS and Android with slide animation which contains tab icon (normal and active) and title. You can use custom hat React Element (component above the active tab), if you use custom hat please provide also hatWidth and hatHeight.

In this lib I'm using Ripple component.

Installation

yarn add react-native-tab-bar-footer

Usage


import TabBar from 'react-native-tab-bar-footer'
...
  const tabs = [
    {
      icon: star,
      activeIcon: starActive,
      title: 'Favorites'
    },
    {
      icon: play,
      activeIcon: playActive,
      title: 'Play'
    },
    {
      icon: user,
      activeIcon: userActive,
      title: 'Profile'
      
    },
  ]
  render() {
    return <TabBar onTabChange={(index) => alert(index)} tabs={tabs} />
  }

Props

PropDefaultTypeDescription
tabs[]Array<Tab>Tab objects
initialIndex0numberInitial active tab
onTabChangeundefinedfunconClick tab
slideSpeed25numbertabBar animation speed
slideBounciness10numbertabBar bounciness
tabSize30numbertab size
barColor'white'colortabBar color
height60numbertabBar height
titleStyle-styletitle custom style
iconStyle-styleicon custom style
animationDuration200numberanimation duration
ripplePropsrippleCenteredobjectRipple component props
hat<View/>React.Element<*>Custom active hat component
hatWidth78numberActive hat component width
hatHeight78numberActive hat component height

Tab object structure:

type Tab = { 
  icon: string|number, 
  activeIcon: string|number, 
  title: string
}

Questions or suggestions?

Feel free to open an issue

Keywords

FAQs

Last updated on 12 Sep 2018

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