Skip to main content

Timeline

Timeline component
(code example)

info

This component extends ScrollView props.

API​

theme​

Specify theme properties to override specific styles for calendar parts

Theme

style​

Specify style for calendar container element

ViewStyle

events​

List of events to render on the timeline

Event[]

start​

The timeline day start time

number

end​

The timeline day end time

number

onEventPress​

Handler which gets executed when event is pressed

(event: Event) => void

onBackgroundLongPress​

Handler which gets executed when background is long pressed. Pass to handle creation of a new event

(timeString: string, time: NewEventTime) => void

onBackgroundLongPressOut​

Handler which gets executed when background's long pressed released. Pass to handle creation of a new event

(timeString: string, time: NewEventTime) => void

renderEvent​

Specify a custom event block

(event: PackedEvent) => JSX.Element

scrollToFirst​

Whether to scroll to the first event

boolean

format24h​

Whether to use 24 hours format for the timeline hours

boolean