Skip to content

Framework Components ​

Public components, props, events, and refs provided by @timescope/*.

PackageComponentGuide
@timescope/vueTimescopeVue
@timescope/reactTimescopeReact
@timescope/svelteTimescopeSvelte
@timescope/solidTimescopeSolid
@timescope/lunaTimescopeLuna

Props ​

options?
Prop
Complete chart configuration; updates replace it.
time?
Prop
Selected time; null follows the clock.
Type
Decimal | number | string | Date | null
zoom?
Prop
Selected zoom level.
Type
number
timeRange?
Prop
Navigation bounds.
Type
TimescopeRange<Decimal | number | string | Date | null | undefined>
zoomRange?
Prop
Zoom bounds.
Type
TimescopeRange<number | undefined>
selectionRange?
Prop
Selected range; null clears it.

Creation-only props ​

initialTime?
Prop
Creation-time selection; a defined time takes precedence.
Type
Decimal | number | string | Date | null
Default
null
initialZoom?
Prop
Creation-time zoom; a defined zoom takes precedence.
Type
number
Default
0
initialFit?
Prop
Fits the initial range with CSS-pixel padding; requires undefined time and zoom, and no initialTime or initialZoom.
Type
TimescopeRange<TimescopeTimeLike<never>> | { range: TimescopeRange<TimescopeTimeLike<never>>, padding?: number | [number, number] }
renderThread?
Prop
Rendering thread selected at creation.
Type
'main' | 'worker'
Default
Auto
fonts?
Prop
Additional browser font data loaded at creation.
Type
(string | { family: string, source: string | BufferSource, desc?: FontFaceDescriptors })[]
Default
Auto
FrameworkInput prop type
LunaT | (() => T)

Guide

Host props ​

FrameworkProps
Reactstyle?: CSSProperties, className?: string
Solidstyle?: any, class?: any
VueNative <div> attributes
Sveltestyle?: string, class?: string
Lunastyle?: string | (() => string), class?: string | (() => string)

Guide

Events and callbacks ​

timechanged
Event
Selected time is committed.
React / Solid / Luna callback
onTimeChanged?
Value
Decimal | null
timechanging
Event
Time changes during interaction.
React / Solid / Luna callback
onTimeChanging?
Value
Decimal | null
timeanimating
Event
Time animation progresses.
React / Solid / Luna callback
onTimeAnimating?
Value
Decimal | null
zoomchanged
Event
Selected zoom is committed.
React / Solid / Luna callback
onZoomChanged?
Value
number
zoomchanging
Event
Zoom changes during interaction.
React / Solid / Luna callback
onZoomChanging?
Value
number
zoomanimating
Event
Zoom animation progresses.
React / Solid / Luna callback
onZoomAnimating?
Value
number
selectionrangechanged
Event
Selection is committed or cleared.
React / Solid / Luna callback
onSelectionRangeChanged?
Value
TimescopeRange<Decimal> | null
selectionrangechanging
Event
Selection changes during interaction.
React / Solid / Luna callback
onSelectionRangeChanging?
Value
TimescopeRange<Decimal> | null
animating
Event
Time-animation activity changes.
React / Solid / Luna callback
onAnimating?
Value
boolean
editing
Event
Time-editing state changes.
React / Solid / Luna callback
onEditing?
Value
boolean
ready
Event
First drawable mount.
React / Solid / Luna callback
onReady?
mount
Event
Each drawable mount.
React / Solid / Luna callback
onMount?

Guide · Timescope events

Component refs ​

FrameworkRef typeMethods
Vue—setTime, setZoom, fitTo, prepareView, nextFrame
ReactTimescopeAPIsetTime, setZoom, fitTo, prepareView, nextFrame
Svelte—setTime, setZoom, fitTo, prepareView, nextFrame

Method signatures · Guide

time
Property
Committed selected time.
Type
Decimal | null
timeChanging
Property
Time during interaction.
Type
Decimal | null
timeAnimating
Property
Time during animation.
Type
Decimal | null
zoom
Property
Committed zoom level.
Type
number
zoomChanging
Property
Zoom during interaction.
Type
number
zoomAnimating
Property
Zoom during animation.
Type
number
selectionRange
Property
Committed selected range.
selectionRangeChanging
Property
Selection during interaction.
animating
Property
Whether time animation is active.
Type
boolean
editing
Property
Whether time is being edited.
Type
boolean