Giter Club home page Giter Club logo

whitehatcip / react-native-dynamic-tab-indicators Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 44.49 MB

"A simple component that allows to show swipeable tabs in a screen, with a really nice animated indicator that follows user's finger when swiping through tabs and that resizes based on the tab's width.

License: MIT License

Kotlin 4.29% JavaScript 11.13% Ruby 14.86% Java 26.18% C 0.37% Objective-C 9.15% Objective-C++ 2.78% Swift 3.64% TypeScript 27.61%

react-native-dynamic-tab-indicators's Introduction

react-native-dynamic-tab-indicators

A simple component that allows to show swipeable tabs in a screen, with a really nice animated indicator that follows user's finger when swiping through tabs and that resizes based on the tab's width.

Installation

npm install react-native-dynamic-tab-indicators

Usage

import { DynamicTabBar } from "react-native-dynamic-tab-indicators";

// ...
const tabs: Tab[] = [
  { tabName: 'Men', imageSrc: require('../assets/tabsBackgrounds/man.jpg') },
  {
    tabName: 'Women',
    imageSrc: require('../assets/tabsBackgrounds/woman.jpg'),
  },
  { tabName: 'Kids', imageSrc: require('../assets/tabsBackgrounds/kid.jpg') },
  {
    tabName: 'Home Decor',
    imageSrc: require('../assets/tabsBackgrounds/home-decor.jpg'),
  },
];

<DynamicTabBar tabs={tabs} />

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT


Made with create-react-native-library

Rewards

I created this library starting from a blog post on Medium that you can find at this link:

https://medium.com/timeless/dynamic-tab-indicators-in-react-native-using-reanimated-part-i-9edd6cc7cc84

I wanted to keep track of this component he was teaching about, and since it was one of those cases in which the component was highly isolatable, I wanted to try out to publish an npm package for future needs.

In short, I simply used the code from the blog post to create this npm package for learning purposes, hence, 99% of the code is not written from me. I just changed it a little bit to pass some props to the component from outside of it.

react-native-dynamic-tab-indicators's People

Contributors

whitehatcip avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.