Skip to content
English
Motion recording comes with Pro. Its preview shows once you unlock it.

How it works

A textbook figure for kinematics. A flat figure has two joints: the head nods forward up to 45° and the arm lifts forward up to 135°; dashed arcs show how far each can turn. Drag either one and a recording starts: every frame samples both angles against time until you press Stop or the time limit is reached. The two traces beside the figure plot angle against time on one shared axis, so you can see which joint moved first and how fast. Replay runs a playhead through both traces while the figure repeats the movement; drag on the traces to scrub. Each trace's header reads the angle at the playhead and the angular speed there, the slope of the trace: steep where the joint moves fast, flat where it rests.

Use it for

  • Teach position–time graphs: a flat stretch means rest, a steep one means fast motion, and the slope is the speed.
  • Compare two movements on one time axis to see their order and overlap.

Look elsewhere when

  • For measured data from sensors or video, use a chart of that data: this figure records only what is moved on screen.

Usage

import React, { useState } from 'react'
import { PuppetTake } from './PuppetTake.jsx'

export function MotionLesson() {
  const [take, setTake] = useState(null)
  return <PuppetTake value={take} onChange={(next) => setTake(next)} maxSeconds={8} />
}

Props

PropTypeDefaultWhat it does
value{ duration: number, samples: Array<{ t, head, arm }> } | null—Controlled recording: its length in seconds and the samples, each a time in seconds with the head angle (0–45°) and the arm angle (0–135°). null shows no recording.
defaultValue{ duration, samples } | nulla nod, then an arm lift, 5 sStarting recording when uncontrolled; Reset returns to it.
onChange(take, { reason }) => void—Called when a recording stops (reason 'record') or Reset is pressed (reason 'reset').
defaultTimenumberhalf the recordingWhere the playhead starts, in seconds, and where Reset puts it. After a new recording it stands at the end.
maxSecondsnumber6Longest recording, in seconds (1–60); it is also the length of the time axis.
labelsobject—Replaces any built-in text: title, formula, head, arm, figure, help, traces, record, stop, play, pause, reset, readout, recording, empty, seconds, degrees and speed ('{n}'), started, recorded and paused ('{n}'), playing and restored.
localestring'en'Language tag for the numbers.
classNamestring—Extra class on the card, for example to set its width (30rem by default, never wider than its container).

Accessibility

  • The head and the hand are sliders with their angle as the value. Arrow keys turn them by 5° (Shift or Page keys by 15°), Home and End go to the ends of the range. The first key starts a recording and Enter on a joint stops it; while recording, the joint follows the keys at 150° per second so the trace has a real slope.
  • The traces are a slider for the playhead: arrows move it by 0.1 s (Shift by 0.5 s), Home and End go to the start and the end.
  • Record and Replay are buttons whose names change to Stop and Pause while active. A polite status announces when a recording starts and stops and where replay paused.
  • Joints use pointer capture and touch-action none; the traces allow vertical scrolling and scrub with a horizontal drag.

Motion

Recording and replay run in real time, because the timing is the content. Under keyboard control the joints glide at 150° per second. With reduced motion there are no transitions and the record mark does not pulse.

Add it to your project

Pro members copy a prompt and their coding agent installs the source, the same way as the free components.

PuppetTake.jsxpuppet-take.csstokens.cssREADME.md

Both files install together. The stylesheet reads the design tokens in tokens.css and carries fallbacks, so it also works alone.

Form inputs
Availability grid comes with Pro. Its preview shows once you unlock it.
Boolean operations comes with Pro. Its preview shows once you unlock it.
Cascader comes with Pro. Its preview shows once you unlock it.