Skip to content

Horizontally scrolling picker component for React Native

Notifications You must be signed in to change notification settings

quantfive/react-native-hpicker

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

60 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

react-native-hpicker

<HorizontalPicker/> is a horizontally scrolling picker component. The goal of this component is to be a drop-in replacement for the bundled <Picker/>, but to introduce a nicer and more compact layout.

Installation

You install the picker by running npm install --save react-native-hpicker. Then, simply import the component: import HorizontalPicker from 'react-native-hpicker'; and you're good to go.

Example

import HorizontalPicker from 'react-native-hpicker';

/* ... */

<HorizontalPicker
  style={/* Whatever you want */}
  itemWidth={70}
  selectedValue={this.state.pickerValue}
  foregroundColor='gray'
  onChange={(pickerValue) => this.setState({pickerValue})}>
  <HorizontalPicker.Item label={1} value={1} />
  <HorizontalPicker.Item label={2} value={2} />
  <HorizontalPicker.Item label={3} value={3} />
</HorizontalPicker>

Component properties

TODO: List the props here.

TODOs

  • Improve docs
  • Add tests

About

Horizontally scrolling picker component for React Native

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 69.9%
  • Objective-C 17.8%
  • Python 7.0%
  • Java 5.3%