A horizontal scrollable timeline with month days
npm i react-native-horizontal-timeline --save
First step: import the component:
import { HorizontalTimeline } from 'react-native-horizontal-timeline';
Second step: use it with the required props
<HorizontalTimeline date={new Date().toISOString()} />
Prop | Description | Default |
---|---|---|
date(required) | Valid string used in the Date() constructor, example: '2018-01-10', '2013-07-02T09:00:00', etc | None |
data | Object in the format of { : { marked: , info: },... }, the number represents the day in the timeline, marked will bring an elevation to the day and you can also provide a information to be displayed below the dot image | None |
backgroundColor | backgroundColor passed to each View of Day container | #fefefe |
color | color of the text's of the component | #ac78fb |