All Projects → openGeeksLab → react-native-tab-navigator

openGeeksLab / react-native-tab-navigator

Licence: other
JavaScript for React-Native iOS Android module

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to react-native-tab-navigator

cisco ios
Cisco IOS Catalyst module
Stars: ✭ 14 (-60%)
Mutual labels:  module
HumHub-WeChat
Its a chat widget for admins and moderators You can use from HumHub Admin Panel - it is working with latest HumHub.
Stars: ✭ 14 (-60%)
Mutual labels:  module
wulaphp
一个有点复杂的PHP框架!
Stars: ✭ 26 (-25.71%)
Mutual labels:  module
PowerShell-Troll
A PowerShell module that contains different functions that can be used for pranking your fellow co-worker or anyone else for that matter.
Stars: ✭ 52 (+48.57%)
Mutual labels:  module
fvtt-data-toolbox
Foundry VTT Data Toolbox
Stars: ✭ 17 (-51.43%)
Mutual labels:  module
mylib
Шаблон кросплатформенного CMake-проекта для языка C++ 🇬🇧 Modern CMake crossplatform project template for C++
Stars: ✭ 49 (+40%)
Mutual labels:  crossplatform
glitchify
Tweaks for the official twitch.tv android app
Stars: ✭ 33 (-5.71%)
Mutual labels:  module
note
一些技术笔记
Stars: ✭ 174 (+397.14%)
Mutual labels:  module
module-init
🏁 Create a new node module with all the right stuff.
Stars: ✭ 71 (+102.86%)
Mutual labels:  module
Vaser
Vaser is a powerful high performance event based network engine library for C# .Net. It’s possible to start multiple servers in one program and use the same network code for all servers. In the network communication are all strings are omitted, instead it is based on a unique binary identifier, which the CPU and memory relieves massively.
Stars: ✭ 23 (-34.29%)
Mutual labels:  crossplatform
es-cookie
A simple, lightweight module for handling cookies
Stars: ✭ 36 (+2.86%)
Mutual labels:  module
silverstripe-base
A base module for my SilverStripe projects
Stars: ✭ 17 (-51.43%)
Mutual labels:  module
cppan
Project evolved into Software Network: https://github.com/SoftwareNetwork/sw
Stars: ✭ 108 (+208.57%)
Mutual labels:  crossplatform
damb
An advanced module builder for Dolibarr ERP/CRM
Stars: ✭ 14 (-60%)
Mutual labels:  module
google streetview
A command line tool and module for Google Street View Image API
Stars: ✭ 77 (+120%)
Mutual labels:  module
terraform-remote-state
A Terraform module that configures an s3 bucket for use with Terraform's remote state feature
Stars: ✭ 21 (-40%)
Mutual labels:  module
ngx http hmac secure link module
HMAC Secure Link module for NGINX.
Stars: ✭ 47 (+34.29%)
Mutual labels:  module
nuxt-modules
AX2's Nuxt modules
Stars: ✭ 30 (-14.29%)
Mutual labels:  module
PoShLog
🔩 PoShLog is PowerShell cross-platform logging module. It allows you to log structured event data into console, file and much more places easily. It's built upon great C# logging library Serilog - https://serilog.net/
Stars: ✭ 108 (+208.57%)
Mutual labels:  module
Framer-CollectionComponent
Framer Module
Stars: ✭ 22 (-37.14%)
Mutual labels:  module

iOS iOS npm compatible Twitter Facebook Medium

Medium

About

Our company provides custom UI design and development solutions for mobile applications and websites.

Need a team to create a project?

This project is developed and maintained by openGeeksLab LLC.

react-native-tab-navigator

Requirements

  • React Native 0.50+
  • iOS 9.0+
  • Android 4.2+

Installation

Just run:

  • npm i @opengeekslab/react-native-tab-navigator

Basic usage

import React, { Component } from 'react';
import { StyleSheet, View } from 'react-native';
import { TabNavigation, TabButton, TabIcons } from '@opengeekslab/react-native-tab-navigator';

import Screen1 from './screens/screen1';
import Screen2 from './screens/screen2';
import Screen3 from './screens/screen3';
import Screen4 from './screens/screen4';
import Screen5 from './screens/screen5';

const navigationRouter = {
  Screen_1: {
    screen: Screen1,
    screenOptions: {
      title: 'Item 1',
      showTitle: true,
      animated: true,
      tabIcon: TabIcons.Social,
      animation: [
        {
          name: 'rotationY',
          type: 'bouncing',
        },
      ],
    },
  },
  Screen_2: {
    screen: Screen2,
    screenOptions: {
      title: 'Item 2',
      showTitle: true,
      tabIcon: TabIcons.Message,
      animation: [
        'ripple',
        { name: 'scale' },
        {
          name: 'fume',
          duration: 700,
        },
        {
          name: 'fadeOut',
          duration: 700,
        },
      ],
    },
  },
  Screen_3: {
    screen: Screen3,
    screenOptions: {
      title: 'Item 3',
      tabIcon: TabIcons.TuneView,
      animated: true,
      animation: [],
    },
  },
  Screen_4: {
    screen: Screen4,
    screenOptions: {
      title: 'Item 4',
      tabIcon: TabIcons.Bell,
      animation: [
        {
          name: 'pendulum',
          duration: 700,
        },
      ],
    },
  },
  Screen_5: {
    screen: Screen5,
    screenOptions: {
      title: 'Item 5',
      tabIcon: TabIcons.Lever,
      animation: [
        {
          name: 'scale',
          type: 'bouncing',
        },
      ],
    },
  },
};

const defaultConfig = {
  lazy: true,
  defaultRoute: 'Screen_3',
  screenOptions: {
    showTitle: true,
    animated: true,
    buttonView: TabButton,
    activeTintColor: '#0579fc',
    inactiveTintColor: '#818692',
    animation: ['ripple', 'rotationZ'],
  },
};

const TabNavigation = TabNavigation(navigationRouter, defaultConfig);

type Props = {};
export default class App extends Component<Props> {
  render() {
    return (
      <View style={styles.container}>
        <TabNavigation />
      </View>
    );
  }
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    backgroundColor: '#F5FCFF',
  },
});

To add a screen to the tab bar, you need to create an object containing information about routers.

Screen_1: {
    screen: Screen1,
    screenOptions: {
      title: 'Item 1',
      showTitle: true,
      animated: true,
      tabIcon: TabIcons.Social,
      animation: [
        {
          name: 'rotationY',
          type: 'bouncing',
        },
      ],
    },
}
  • screen - is the screen to display

  • screenOptions - is options for the screen, which could contain the following fields:

    • title - the name under the tab icon, if you do not specify it, then it will use as a default and will be equal to the key (as the example: Screen_1)

    • showTitle - is the flag, indicating the display of the name of the tab.

    • animated - is the flag, indicating whether the icon should be animated.

    • tabIcon - fields of the transfer picture or component, which is used as a tab icon.

    • animation - the field which is contain an array with the desired animations provided by the library.

    • activeTintColor - the color of active tab

    • inactiveTintColor - inactive tab color

    • iconStyle - custom Icon Style

    • textStyle - custom name style of the tab

    • textActiveStyle - custom name style for an active tab

    • textInactiveStyle - custom name style for inactive tab

Animations usage

The library provides animations fume, pendulum, rotationX, rotationY, rotationZ, opacity, scale, ripple. All animations can be combined.

  animation: [
    'ripple',
    'scale',
  ]

Also, animations can be additionally set aside. If you transfer an object to the animation array that consists of the field 'name' - the name of the animation and the type: "bouncing", the animation will have an "elastic effect" (except Ripple).

animation: [{
  name: 'scale',
  type: 'bouncing',
}]

In the field of durations, you specify the animation time in milliseconds (400ms by default)

animation: [
  {
    name: 'fume',
    duration: 700,
  },
  {
    name: 'fadeOut',
    duration: 700,
  },
]

The library provides built-in icons for Social, Message, TuneView, Bell, Lever, Tune. They can be imported

import { TabIcons } from 'react-native-tab-navigator';
{
      title: 'Item 5',
      tabIcon: TabIcons.Lever
}

You can transfer your icon

const myIcon = require('./my-icon-file.png');
{
      title: 'Item 5',
      tabIcon: myIcon
}

You can send a component as an icon. If the component implements internal animations, it must provide a callAnimations() method to call the animations.

Contact us if interested.

Inspired by @Ramotion

Licence

Expanding is released under the MIT license.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].