0.2.0 • Published 2 years ago

react-native-horizontal-picker-2 v0.2.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

React Native Horizontal Picker 2

npm version npm Platform - Android and iOS License: MIT styled with prettier

Installation

Add the dependency:

npm i react-native-horizontal-picker-2

Peer Dependencies

`Zero Dependency`

Usage

Import

import HorizontalPicker from "react-native-horizontal-picker-2";

Fundamental Usage

<HorizontalPicker
  style={{ flex: 0, height: 75 }}
  data={[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]}
  onChange={(val, index) => {
    console.log({ val, index });
    setValueSelection(val);
  }}
/>

Example Project 😍

You can checkout the example project 🥰

Simply run

  • npm i
  • react-native run-ios/android

should work of the example project.

Configuration - Props

Fundamentals

PropertyTypeDefaultDescription
dataany[]undefinedset the data
onChangefunctionundefinedset your own logic when the selected data is changed

Customization (Optionals)

PropertyTypeDefaultDescription
styleViewStyledefaultset or override the style object for the main container

Future Plans

  • LICENSE
  • Full Code Refactor
  • Better example
  • Cooler GIF
  • Write an article about the lib on Medium

Credits

This is a new fork from React Native Picker Horizontal Since this is no updated more than 2 years, I will maintain this one :)

Author

FreakyCoder, kurayogun@gmail.com

License

React Native Horizontal Picker 2 is available under the MIT license. See the LICENSE file for more info.