Skip to content
/ghost-cursor

Examples

Each demo is the real component. Move into a box to use it yourself, or press 0.5× to watch the take at half speed.

The highlight comes from the menu’s own pointermove handler and the reorder from its click handler. The menu has no replay code. It only has data-ghost-id on the trigger and the items.

Writing
  • Springs, not curves1,240 reads
  • The cost of a hover3,810 reads
  • Ghosts in the DOM2,275 reads
  • A menu, slowly960 reads
0.0s
Recorded by hand. The take ends on “A to Z”, so the menu cross-fades back to “Newest” before each loop.

Segmented control and switch

The pill and the tiles move on springs, so at 0.5× you can watch the pill catch up. Arrow keys move the selection with no animation, because a keyboard change should land instantly.

0.0s
The take ends on List with Compact off, where it started, so the loop restarts without a cross-fade.

Typing

Key presses replay as keydown and keyup. Printable keys also insert text through an input event, which is what React’s onChange listens for. The list has no animation, because it changes on every key.

Nothing picked yet
0.0s
Recorded by the agent script from four steps.

The recorder, replaying itself

A <Recorder> with captureSynthetic, inside a <GhostCursor>. The outer ghost records a take with the inner recorder and presses Preview, and a second ghost replays it.

Press Record, then use the component in the box.
0.0s
Two ghosts, one inside the other. Each one steps aside when you move into its box.