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.
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>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 TooltipAgent skill covers the install, what the script does, and its defaults.