Interface

TimelineCanvasLayerProps

Props for the package custom canvas layer component.

Usage notes

These props combine ordinary canvas attributes with the same drawing options accepted by useTimelineCanvasLayer. Use the component when the layer should fill its positioned parent automatically; use the hook directly when an app owns a bespoke canvas element or layout.

Signature

Type Definition
Interface TimelineCanvasLayerProps

Type parameters

NameConstraintDefaultDescription
TrackKindNonestringApp-defined track kind values carried by custom draw geometry.

Properties

NameSignatureDescription
clearBeforeDraw?clearBeforeDraw?: booleanClear the canvas before each draw. Defaults to true.
collapsedTrackHeight?collapsedTrackHeight?: numberCollapsed track height in pixels.
drawdraw: TimelineCanvasLayerDraw<TrackKind>Draws custom timeline visuals into an app-owned canvas.
edgeThreshold?edgeThreshold?: numberMouse/pen edge hit threshold in pixels.
overscanPixels?overscanPixels?: numberExtra pixels around the viewport included in visible clip queries.
redrawOnPlayhead?redrawOnPlayhead?: booleanRedraw when only the playhead changes. Defaults to false.
rulerHeight?rulerHeight?: numberHeight of the top ruler region in pixels.
touchEdgeThreshold?touchEdgeThreshold?: numberTouch edge hit threshold in pixels.
trackHeight?trackHeight?: numberDefault expanded track height in pixels.