Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

react-native-horizontal-picker-2

WrathChaos30MIT0.2.0TypeScript support: included

Fully customizable, performant horizontal picker for React Native

horizontal-picker, picker, picker-2, horizontal-picker-2, horizontal-scroller, scroll, scroller, reanimated, reanimated-2, gesture, gesture-handler, animation, select, FreakyCoder, freakycoder, kuray, Kuray, react, react-native, javascript, ui-lib, rn

readme

React Native Horizontal Picker 2

React Native Horizontal Picker 2

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

React Native Horizontal Picker 2

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

Property Type Default Description
data any[] undefined set the data
onChange function undefined set your own logic when the selected data is changed

Customization (Optionals)

Property Type Default Description
style ViewStyle default set or override the style object for the main container

Future Plans

  • <input checked="" disabled="" type="checkbox"> LICENSE
  • <input disabled="" type="checkbox"> Full Code Refactor
  • <input disabled="" type="checkbox"> Better example
  • <input disabled="" type="checkbox"> Cooler GIF
  • <input disabled="" type="checkbox"> 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.