2.2.3 • Published 2 years ago

@mindinventory/react-native-tab-bar-interaction v2.2.3

Weekly downloads
5
License
ISC
Repository
github
Last release
2 years ago

React Native Tabbar Interaction npm.io

Beautiful Tabbar Interaction with Sliding Inset FABs, made with React Native.

Check it out on Béhance (https://www.behance.net/gallery/68043143/Tab-bar-interaction-with-animated-icons)

Check it out on Dribbble (https://dribbble.com/shots/4844696-Tab-bar-interaction-with-animated-icons)

Installation

using npm:

npm install @mindinventory/react-native-tab-bar-interaction

using yarn:

yarn add @mindinventory/react-native-tab-bar-interaction

Dependencies

  • react-native-svg
  • react-native-svg-transformer

Configure dependencies in file metro.config.js update this module export.

const { getDefaultConfig } = require("metro-config");

module.exports = (async () => {
  const {
    resolver: { sourceExts, assetExts }
  } = await getDefaultConfig();
  return {
    transformer: {
      babelTransformerPath: require.resolve("react-native-svg-transformer")
    },
    resolver: {
      assetExts: assetExts.filter(ext => ext !== "svg"),
      sourceExts: [...sourceExts, "svg"]
    }
  };
})();

create one declarations.d.ts in your root directory.

declare module "*.svg" {
  import React from 'react';
  import { SvgProps } from "react-native-svg";
  const content: React.FC<SvgProps>;
  export default content;
}

Supported platform

  • Android
  • Ios

Usage

import Tabbar from "@mindinventory/react-native-tab-bar-interaction";
...

const tabs = [
  {
    name: 'Home',
    activeIcon: <Icon name="home" color="#fff" size={25} />,
    inactiveIcon: <Icon name="home" color="#4d4d4d" size={25} />
  },
  {
    name: 'list',
    activeIcon: <Icon name="list-ul" color="#fff" size={25} />,
    inactiveIcon: <Icon name="list-ul" color="#4d4d4d" size={25} />
  },
  {
    name: 'camera',
    activeIcon: <Icon name="camera" color="#fff" size={25} />,
    inactiveIcon: <Icon name="camera" color="#4d4d4d" size={25} />
  },
  {
    name: 'Notification',
    activeIcon: <Icon name="bell" color="#fff" size={25} />,
    inactiveIcon: <Icon name="bell" color="#4d4d4d" size={25} />
  },
  {
    name: 'Profile',
    activeIcon: <Icon name="user" color="#fff" size={25} />,
    inactiveIcon: <Icon name="user" color="#4d4d4d" size={25} />
  },

];
...

return (
  <Tabbar
    tabs={tabs}
    tabBarContainerBackground='#6699ff'
    tabBarBackground='#fff'
    activeTabBackground='#6699ff'
    labelStyle={{ color: '#4d4d4d', fontWeight: '600', fontSize: 11 }}
    onTabChange={() => console.log('Tab changed')}
  />
);

Component props

Tabbar

propvaluerequired/optionaldescription
tabsarrayrequiredIt is user for showing icon and label.
tabBarContainerBackgroundstringoptionalUse for change tabBar container color.
tabBarBackgroundstringrequiredUse for change tabBar background color.
activeTabBackgroundstringoptionalUse for change active tab background color.
labelStylestyleoptionalUse for apply style on tab label.
onTabChangefunctionoptionalUse to perform any action when click on tab.
containerBottomSpacenumberoptionalUse to add space between tabBar container and from bottom of screen.
containerWidthnumberoptionalUse for set width of tabBar container
containerTopRightRadiusnumberoptionalUse for add top right radius on tabBar container
containerTopLeftRadiusnumberoptionalUse for add top left radius on tabBar container
containerBottomLeftRadiusnumberoptionalUse for add bottom left radius on tabBar container
containerBottomRightRadiusnumberoptionalUse for add bottom right radius on tabBar container
defaultActiveTabIndexnumberoptionalUse to set default active tab
transitionSpeednumberoptionalUse to set transition speed

tabs

propertiesvaluerequired/optionaldescription
namestringrequireduse for showing tab label.
activeIconcomponentrequiredUse for showing tab active icon/image.
inactiveIconcomponentrequiredUse for showing tab inactiveIcon icon/image.

Version Migration

Version: 2.2.2

How to migrate version 1.0.0 to 2.1.2+.

LICENSE!

React-native-tabbar-interaction is MIT-licensed.

Let us know!

We’d be really happy if you send us links to your projects where you use our component. Just send an email to sales@mindinventory.com And do let us know if you have any questions or suggestion regarding our work.

2.2.3

2 years ago

2.2.2

2 years ago

2.2.1

2 years ago

2.2.0

2 years ago

2.1.2

3 years ago

2.1.1

3 years ago

2.1.4

3 years ago

2.1.3

3 years ago

2.0.3

3 years ago

2.0.2

3 years ago

2.0.5

3 years ago

2.0.4

3 years ago

2.0.7

3 years ago

2.0.6

3 years ago

2.0.9

3 years ago

2.0.10

3 years ago

2.0.8

3 years ago

2.1.0

3 years ago

2.0.1

3 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago