Timeline surface preview
A compact surface with track rows, clips, a ruler, and playhead affordances.
Installation
pnpm add @techsquidtv/canvas-timeline-reactnpm install @techsquidtv/canvas-timeline-reactyarn add @techsquidtv/canvas-timeline-reactbun add @techsquidtv/canvas-timeline-react- 1
Install the package.
The command above adds the React bindings and their package dependencies.
- 2
Import from the React entrypoint.
@techsquidtv/canvas-timeline-react - 3
Add the timeline styles.
Use the full stylesheet with shadcn-compatible tokens, or base.css when your app owns the visual theme.
Default visuals import '@techsquidtv/canvas-timeline-react/styles.css';Base geometry import '@techsquidtv/canvas-timeline-react/base.css';
Usage
import { Timeline } from '@techsquidtv/canvas-timeline-react';
export function EditorSurface() { return ( <Timeline.Root className="h-96"> <Timeline.TrackList> <Timeline.Track trackId="video-1" /> </Timeline.TrackList> </Timeline.Root> );}Notes
- Render these components inside a
TimelineProviderso they can read the sharedTimelineEngine. - Import
@techsquidtv/canvas-timeline-react/styles.csswhen your app defines shadcn-compatible semantic tokens, orbase.csswhen supplying your own theme. - CSS styles interaction layers; renderer theme styles canvas-painted timeline visuals.
- Use the theming guide when CSS tokens should drive canvas-painted colors.
API Reference
Timeline Surface
The root interaction shell for panning, zooming, selecting, and arranging tracks.
Exports
| Name | Reference | Description |
|---|---|---|
Timeline.Root | Namespace export | Provider-aware interaction surface root for pan, zoom, and selection. |
Timeline.TrackList | Namespace export | Scrollable container for timeline track rows. |
Timeline.KeyboardScope | API reference | Focus-scoped wrapper for opt-in timeline keyboard shortcuts. |