0.0.3 • Published 3 years ago
modern-text-carousel v0.0.3
Setup
This libray is available on npm, install it with:
npm install --save modern-text-carousel
or
yarn add modern-text-carousel
Usage
- Import modern-text-carousel
import { CarouselItem, TextCarousel } from 'modern-text-carousel';- Render
render(){
return (
<View>
<TextCarousel height={50} interval={1000} direction='up'>
<CarouselItem>
<Text>
Hello
</Text>
</CarouselItem>
<CarouselItem>
<Text>
World
</Text>
</CarouselItem>
</TextCarousel>
</View>)
}Available props
| Name | Type | Default | Description |
|---|---|---|---|
| height | number | 40 | Height for container |
| interval | number | 4000 | Loop interval time |
| direction | string | 'up' | Direction |