Skip to content
/ghost-cursor

Recording

A take is a JSON file. You can record one by hand in the browser, or write the take as a list of steps and let an agent record it with a script.

By hand

Start your dev server and open the page with ?record in the URL. Every demo on the page turns into a recorder.

Step 1: Record a take

Press Record. The component remounts, so the take starts from its first frame. Use it the way you want the reader to see it, rest the pointer for a moment, then press Stop. The recorder trims the move from the box to the Stop button off the end.

Time starts with your first event inside the box, so the pause before you get there doesn’t end up in the take. Pointer moves are sampled every 24ms.

Press Record, then use the component in the box.
0.0s
Record, one like, Stop. The counter goes up as the recorder receives events.

Step 2: Preview it, then save it

Preview replays the take inside the recorder, so you can watch it before you keep it. The Recorder button takes you back. When it looks right, press Copy recording and paste the JSON into a file next to your component.

import recording from "./like-button.json";

<GhostCursor recording={recording}>
  <LikeButton />
</GhostCursor>
Press Record, then use the component in the box.
0.0s
After Preview, a second ghost appears inside the recorder and replays the take the first one made.

With an agent

With a coding agent you don’t have to record by hand. Install the ghost-record skill and describe the take in one sentence. The agent finds the component, records it with human-like input, checks the replay and prints the snippet.

/ghost-record filter list: type "to", then pick Tooltip
Nothing picked yet
0.0s
Recorded by ghost-record from that sentence. Every element it aimed at has a dashed outline.

Agent skill covers the install, what the script does, and its defaults.