kevinhikaruevans / react-native-apple-scroll-wheel

The iconic scroll wheel that debuted with the original iPod. Now for React Native.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

react-native-apple-scroll-wheel

The iconic scroll wheel that debuted with the original iPod. Now for React Native.

react-native-apple-scroll-wheel

๐Ÿš€ Getting Started

Using npm:

npm install --save react-native-apple-scroll-wheel

Using yarn:

yarn add react-native-apple-scroll-wheel

Then you can easily import to your project using:

import AppleScrollWheel from 'react-native-apple-scroll-wheel';

โœ๏ธ Example

In the snippet below, we outline the basic interface to the AppleScrollWheel:

<AppleScrollWheel
  value={this.state.value}
  minValue={-720}
  increment={1}
  maxValue={720}
  onChangeValue={value => this.setState({ value })}
/>

For a complete working example, please check out the included example code.

๐Ÿ“Œ Props

Prop Type Default Required
radius number 120 No
innerRadius number 60 No
increment number 10 No
minValue number 360 * -2 No
maxValue number 360 * 2 No
value number 0 No
onChangeValue func v => null No
outerCircleStyle shape[object Object] styles.outerCircleStyle No
innerCircleStyle shape[object Object] styles.innerCircleStyle No
InnerComponent func React.Fragment No

โœŒ๏ธ License

MIT

Buy @cawfree a coffee

About

The iconic scroll wheel that debuted with the original iPod. Now for React Native.

License:MIT License


Languages

Language:JavaScript 47.6%Language:Objective-C 21.6%Language:Ruby 11.7%Language:Starlark 10.0%Language:Java 9.1%