Thinking UI

PendulumPRO

A Newton's cradle in fine lines: momentum passes through the row and back, steady as a metronome.

Code

2 files · 148 lines of TypeScriptPRO

Pendulum is part of Pro

Get its source, the one-paste agent prompt and all 113 components, for a one-time $99.

Motion notes

  • The outer balls swing on a sine, the motion of a real small-angle pendulum: they leave the row at full speed and hang for a moment at the top, which is what makes it hypnotic.
  • At each impact a pulse of light runs through the resting balls and lingers on the one that leaves, so you see the momentum travel, not just the ends move.
  • Balls are outlined rings with a faint arc trailing the swing; strings stop at the rim. Use fewer balls at 24px so each ring stays a ring.
  • Spacing is solved from the swing, so the outermost ball never clips the canvas at any size or ball count. Reduced motion holds the right ball at the top of its arc.

Usage

Example
<StatusPill icon={<NewtonCradle size={32} />} label="Working" />

Props

PropTypeDefaultDescription
sizenumber32Size in px.
ballsnumber5Number of balls, 3–7.
cyclenumber1.8Seconds for a full swing out and back on both sides.
classNamestring—Classes for the canvas.