react-native-number-scroll
v1.4.1
Published
react native number scroller
Maintainers
Readme
react-native-number-scroll
Create simple animated number scroller in react native.
Main Props
| Prop | Type | Default | Required | Description | --- | :--: | :--: | --- | :--: | max | number | undefined | true | The maximum number that can be reached | min | number | undefined | true | The minimum number that can be reached | scrollerWidth | number | 300 | false | The width of the scroller | startingIndex | number | undefined | false | The initial index the scroller will center on | startingValue | number | undefined | false | The initial value the scroller will center on (overrides startingIndex) | numberStyles | TextStyle | undefined | false | The styles of the number items | getValue | Function | (val:number)=>void | true | The callback the retrieves the currently centered value | itemMargin | number | 2 | false | Margin space between each item on the scroller. | injectedValue | number | undefined | false | if this value changes the scroller will auto-scroll to the index of that value in the array. |AddSideButtons | boolean | false | false | Adding manual side buttons. |sideButtonOptions | SideButtonOptions | undefined | false | additional options for the manual buttons. |pauseStart | boolean | false | false | if true, value will not be returned on mount. |listContainerStyle | ViewStyle | undefined | false | styling for the array container. |showIndicator | boolean | false | false | visual indicator that shows the center of the scroller. |indicatorStyle | TextStyle | undefined | false | styles for the indicator
SideButtonOptions
| Prop | Type | Default | Required | Description | --- | :--: | :--: | --- | :--: |leftName | MaterialCommunityIcons name | undefined | false | The type of the left icon (supports MaterialCommunityIcons). |rightName | MaterialCommunityIcons name | undefined | false | The type of the right icon (supports MaterialCommunityIcons). |size | number | undefined | false | size of the buttons. |color | number | undefined | false | color of the buttons.
