RemotionUI

Cursor Path

Cursor travelling a route, with drawn trail and click ripples.

PrimitivePaths & shapes

cursor-path30fps · 960×540
Install
$ npx remotion-ui@latest add cursor-path

Moves a pointer along a route built from points, or along an SVG path passed to d. Travel is measured by arc length, so the cursor holds one speed across a long hop and a short one, and smoothing rounds the corners into a hand-like curve.

The trail draws in behind the cursor by default; trail="guide" shows the whole route up front instead. clickAt ripples at the waypoints you name — the timing is derived from where each waypoint sits along the path, so clicks stay in sync when the duration changes.

Advanced. Installs @remotion/paths.

Agent notes

Install first, then import the copied source component locally. AI guide →

Import
@/remotion/primitives/cursor-path
  • Use when: frame-level motion primitives and reusable animation wrappers.
  • Customize: points, d, durationInFrames, delayInFrames, plus copied source for timing, layout, colors, and typography.
  • Rule: do not import this component from the remotion-ui npm package; it is copied into your project.

Usage

Example
import { CursorPath } from "@/remotion/primitives/cursor-path"; <CursorPath points={[{ x: 80, y: 120 }, { x: 320, y: 80 }]} clickAt={[1]} />

API Reference

PropTypeDescription
points{ x: number; y: number }[]Route waypoints in the parent's coordinates.
dstringAuthored SVG path to follow instead of points.
durationInFramesnumberTravel duration.
delayInFramesnumberFrames before the cursor sets off.
colorstringTrail and ripple color.
sizenumberCursor size in px.
smoothingnumber0 hops in straight lines; higher rounds corners.
trail"draw" | "guide" | "none"Reveal the route behind the cursor, show it up front, or hide it.
clickAtnumber[]Waypoint indices that ripple as the cursor arrives.

Related