Package Exports
- react-native-roller
- react-native-roller/lib/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-roller) 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-roller
A roller component for React Native
Installation
yarn add react-native-rolleror
npm i react-native-rollerExamples
<Roller
rows={[
'1 - While there is life, there is hope',
'2 - Do what you say,say what you do',
'3 - All things come to those who wait',
'4 - Nothing seek, nothing find'
]}
style={styles.bg}
/>
<Roller
rows={[
'1 - While there is life, there is hope',
'2 - Do what you say,say what you do',
'3 - All things come to those who wait',
'4 - Nothing seek, nothing find'
]}
itemStyle={styles.bg}
visibleRowsNum={3}
spaceBetween={6}
/>
bg styles:
{
backgroundColor: 'rgba(0, 0, 0, 0.5)',
borderRadius: 4,
paddingHorizontal: 9,
}API
| prop | type | default value |
|---|---|---|
rows |
string[] |
|
visibleRowsNum |
number |
1 |
rowHeight |
number |
30 |
spaceBetween |
number |
0 |
interval |
number |
3000 |
animationDuration |
number |
600 |
fadeOutDuration |
number |
600 |
fadeInDuration |
number |
600 |
style |
StyleProp<ViewStyle> |
|
itemStyle |
StyleProp<ViewStyle> |
|
textStyle |
StyleProp<TextStyle> |
|
shouldRoll |
boolean | ((rowsLen: number, visibleRowsNum: number) => boolean) |
true |
forceRoll |
boolean |
true |
enableVisibleOffset |
boolean |
false |