interface

Cursor

An animated pointer that travels between two canvas points on the house spring and emits a single restrained click ripple on arrival. A full-canvas layer for product and dev demos.

$ npx ondajs add cursor

Cursor

An animated pointer that travels from one canvas point to another on the house spring (useSpringValue) and emits a single restrained click ripple on arrival. It's a full-canvas layer — you position it with the from* / to* fractions (0..1 of the canvas), not with placement. Pairs with code-block, terminal, and browser-frame to narrate product and dev demos.

Props

PropTypeDefaultNotes
fromX / fromYnumber0.28 / 0.72Start point (canvas fractions).
toX / toYnumber0.6 / 0.42End point (canvas fractions).
delaynumber6Frames before moving.
travelDurationnumber24Frames to travel.
clickbooleantrueEmit a click ripple on arrival.
clickDelaynumber6Frames after arrival before the click.
colorstring#F2F2F4Pointer + ripple color.
sizenumber56Pointer height in px.

Usage

TSX
import { AbsoluteFill } from 'remotion';
import { Cursor } from './components/onda/cursor/Cursor';

export const ClickScene = () => (
  <AbsoluteFill>
    {/* ...UI under the cursor... */}
    <Cursor fromX={0.3} fromY={0.7} toX={0.55} toY={0.4} />
  </AbsoluteFill>
);