A mobile-style react picker component optimized for web used
npm install react-mobile-style-pickerThe most powerful mobile-style picker component for React used in web at this moment.
Based on this project, but with a lot of improvements and new features.
- drag to select works properly out of the component.
- support horizontal mode.
- support style a height or width to the component, and the height and width of the picker item will be automatically computed.
- support click to select, and not conflict with drag to select.
- support scroll to select.
- support onClick and other callback of the picker item.
- support custom indicator.
- support custom picker item size.
- support custom picker item margin.
- support custom max visible picker item.
- support custom rotate effect.
- support custom mask alpha.
- support loading state.
Using npm:
$ npm install --save react-mobile-style-picker
javascript
import React from 'react';
import { Picker } from 'react-mobile-style-picker';
import 'react-mobile-style-picker/index.css' // or index.lessconst App = (
zero
one
two
three
four
five
);
const root = document.getElementById('root');
ReactDOM.render( , root);
``WIP