Timelinx

TimelineRuler

High-performance canvas time ruler with M:SS timestamps, half-second cadence dots, and geometric playhead

@timelinx/ui provides two time ruler components:

  • TimelineRulerV3 (Modern CapCut-style): Clean, high-readability canvas ruler rendering timestamps directly as 0:00, 0:01, 0:02, etc., with subtle half-second cadence dots and a geometric flat-topped playhead (RulerPlayheadV3). Supports click-to-seek, scrubbing, and in/out point range highlights.
  • TimelineRulerV2 (Classic NLE): Traditional frame and timecode tick marks rendered on canvas with triangular playhead indicator.

Live Example

Loading...

V3 Usage

import { TimelineRulerV3 } from '@timelinx/ui';

<TimelineRulerV3
  fps={30}
  ppf={ppf}
  duration={duration}
  currentTime={currentFrame}
  scrollLeft={scrollLeft}
  onSeek={(frame) => engine.seekTo(frame)}
  inPoint={inPoint}
  outPoint={outPoint}
/>;

V3 Props

PropTypeDefaultDescription
fpsFrameRaterequiredTimeline frame rate
ppfnumberrequiredPixels per frame
durationnumberrequiredTimeline duration in frames
currentTimenumberrequiredCurrent playhead position in frames
onSeek(frame: number) => voidrequiredCallback when seeking via click or scrub
scrollLeftnumber0Current horizontal scroll offset
heightnumber26Ruler track height in pixels
minVisibleSecondsnumber7Minimum seconds visible even if timeline is empty/short
inPointnumber | null—In-point frame for range highlight
outPointnumber | null—Out-point frame for range highlight

On this page