← Component library

Scrolling Data Ruler

Free

Record names and tick marks accelerate past a fixed reading point on a horizontal scale.

Type
Scrolling labels
Category
Data & Proof
Appearance
Minimal, Monochrome
Editorial role
Explainer
Motion
Slide
Duration
4.54 s · 29.97002997002997 fps
Source film
Introducing Ask Attio · Attio

Customize

Use this component

npx shadcn add @betterframes/record-ruler

This Canvas module needs no npm packages. The usage example includes your edits.

Download .mjsDownload preview
import { draw } from './record-ruler.mjs';

// On each frame, pass this clip’s elapsed time in seconds.
// Coordinates use a 640 × 360 drawing area.
export function render(ctx, seconds) {
  ctx.save();
  ctx.scale(ctx.canvas.width / 640, ctx.canvas.height / 360);
  ctx.clearRect(0, 0, 640, 360);
  draw(ctx, seconds, {});
  ctx.restore();
}
Component source