Package Exports
- react-native-number-scroll
- react-native-number-scroll/lib/cjs/index.js
- react-native-number-scroll/lib/esm/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (react-native-number-scroll) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
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. |