Framework Components
Public components, props, events, and refs provided by @timescope/*.
| Package | Component | Guide |
|---|---|---|
@timescope/vue | Timescope | Vue |
@timescope/react | Timescope | React |
@timescope/svelte | Timescope | Svelte |
@timescope/solid | Timescope | Solid |
@timescope/luna | Timescope | Luna |
Props
options? Complete chart configuration; updates replace it.
- Type
TimescopeOptions
time? Selected time;
null follows the clock. - Type
Decimal | number | string | Date | null
zoom? Selected zoom level.
- Type
number
timeRange? Navigation bounds.
- Type
TimescopeRange<Decimal | number | string | Date | null | undefined>
zoomRange? Zoom bounds.
- Type
TimescopeRange<number | undefined>
selectionRange? Selected range;
null clears it. - Type
TimescopeRange<Decimal> | null
Creation-only props
initialTime? Creation-time selection; a defined
time takes precedence. - Type
Decimal | number | string | Date | null- Default
null
initialZoom? Creation-time zoom; a defined
zoom takes precedence. - Type
number- Default
0
initialFit? 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? Rendering thread selected at creation.
- Type
'main' | 'worker'- Default
- Auto
fonts? Additional browser font data loaded at creation.
- Type
(string | { family: string, source: string | BufferSource, desc?: FontFaceDescriptors })[]- Default
- Auto
| Framework | Input prop type |
|---|---|
| Luna | T | (() => T) |
Host props
| Framework | Props |
|---|---|
| React | style?: CSSProperties, className?: string |
| Solid | style?: any, class?: any |
| Vue | Native <div> attributes |
| Svelte | style?: string, class?: string |
| Luna | style?: string | (() => string), class?: string | (() => string) |
Events and callbacks
timechanged Selected time is committed.
- React / Solid / Luna callback
onTimeChanged?- Value
Decimal | null
timechanging Time changes during interaction.
- React / Solid / Luna callback
onTimeChanging?- Value
Decimal | null
timeanimating Time animation progresses.
- React / Solid / Luna callback
onTimeAnimating?- Value
Decimal | null
zoomchanged Selected zoom is committed.
- React / Solid / Luna callback
onZoomChanged?- Value
number
zoomchanging Zoom changes during interaction.
- React / Solid / Luna callback
onZoomChanging?- Value
number
zoomanimating Zoom animation progresses.
- React / Solid / Luna callback
onZoomAnimating?- Value
number
selectionrangechanged Selection is committed or cleared.
- React / Solid / Luna callback
onSelectionRangeChanged?- Value
TimescopeRange<Decimal> | null
selectionrangechanging Selection changes during interaction.
- React / Solid / Luna callback
onSelectionRangeChanging?- Value
TimescopeRange<Decimal> | null
animating Time-animation activity changes.
- React / Solid / Luna callback
onAnimating?- Value
boolean
editing Time-editing state changes.
- React / Solid / Luna callback
onEditing?- Value
boolean
ready First drawable mount.
- React / Solid / Luna callback
onReady?
mount Each drawable mount.
- React / Solid / Luna callback
onMount?
Component refs
| Framework | Ref type | Methods |
|---|---|---|
| Vue | — | setTime, setZoom, fitTo, prepareView, nextFrame |
| React | TimescopeAPI | setTime, setZoom, fitTo, prepareView, nextFrame |
| Svelte | — | setTime, setZoom, fitTo, prepareView, nextFrame |
time Committed selected time.
- Type
Decimal | null
timeChanging Time during interaction.
- Type
Decimal | null
timeAnimating Time during animation.
- Type
Decimal | null
zoom Committed zoom level.
- Type
number
zoomChanging Zoom during interaction.
- Type
number
zoomAnimating Zoom during animation.
- Type
number
selectionRange Committed selected range.
- Type
TimescopeRange<Decimal> | null
selectionRangeChanging Selection during interaction.
- Type
TimescopeRange<Decimal> | null
animating Whether time animation is active.
- Type
boolean
editing Whether time is being edited.
- Type
boolean