Skip to content

UI Morph Loop

One rounded shape morphs from a button into a loader, a music player, a slider, a toggle, a chart and a search box, driven by a cursor, and loops back to the start.

Motion, D1 Motion2DSeamless loop, verified885 lines of codev1.0.0

In Text & data

Next: Fibonacci Spiral DataSurprise me

UI Morph Loop preview
Starting live preview…
00:00:00:00 / 00:00:00:01

Live, running the real source.

Open in the title maker

Your current settings go with it. Combine several clips and hand them over together from your sequence.

Effect controls

Presets

Which UI states the shape morphs through, in order.

Buttons, player and slider.

Cards, knob and text on dark parts.

The one highlight: check, toggle on, chart line, album art.

0.35

0 settles with no bounce; 1 overshoots a little on every change.

Zoom so each state fills the frame.

Small state name, counter and beat dots in the corners.

Blends five sub-frames per frame. Turn off for faster previews.

The preview runs the same code your AI receives. These settings travel with the hand-off.

Info

What it is

The Dribbble-style UI motion loop that took over X in late September 2026: a single element never cuts away. A cursor clicks the button, it shrinks into a spinner, turns into a check, grows into a music player whose play icon splits into pause, the progress bar is dragged and becomes a volume slider that stretches when pulled past the end, a toggle flips with a stretchy knob, the toggle opens into a chart that draws itself with a tooltip, and the chart collapses into a command palette where typing filters the list. The camera zooms so every state fills the frame and the last frame is the first. Pick the sequence of states, your four colours, the button and notification text, how springy it feels, and whether the cursor, labels and motion blur show.

Reuse it in your own idea

  • Cut it to your music: set cycleSeconds to six bars of your track and every state change lands on a beat.
  • End a launch video on it: let Kinetic Title Reveal put your product name over the last state, or replace the button text with your call to action.
  • Use the Launch sequence with your accent colour as a looping hero on a landing page or a Product Hunt gallery video.
  • Copy springStep for your own UI animation: sum one spring per change of target and any value stays a pure function of time.

Which part is reusable

src/ui-morph-loop.js is the ingredient your AI reuses. demo.js is only the example scene around it, and uses the demo harness only for the demo.

Good to know

  • The UI states are fixed drawings (a music player, a chart, a command list). Changing what they show means editing their draw functions; only the button and notification text are parameters.
  • It does not play sound. The original trend syncs clicks and whooshes to music; add your own audio in the edit.
  • Single-line, left-to-right text. Long labels are shrunk to fit rather than wrapped.

Technical details

Technical details
Implementation
Canvas 2D — plain browser JavaScript, no libraries · ES module src/ui-morph-loop.js
Exports
  • createUiMorphLoop({ sequence?, cycleSeconds?, label?, toastText?, canvas?, ink?, surface?, accent?, overshoot?, cameraFollow?, cursor?, labels?, background?, motionBlurSamples?, fontFamily? }) => { draw(ctx, time, width, height), drawFrame(ctx, info, width, height), cycleSeconds, beatSeconds, states }
  • springStep(x, omega, zeta) => number
  • { tour, launch, music }
Dependencies (exact)
  • apw-runtime@1.0.0 (demo) — Demo harness. src/ui-morph-loop.js has no dependencies.
How it fits a scene

Coordinates: The shape is centred; layout is in units of 1/1000 of the short side, so any aspect ratio works.

Lighting: One soft drop shadow under the shape; flat UI colours.

Timing: Pure function of time; one loop lasts cycleSeconds and the states share it by beats (the full tour is 24 beats, 120 BPM at 12 seconds).

Output
1080×1080, 30 fps, 12 s · procedural (computed from the frame number) · seamless loop — Every animated value (size, corner radius, colour, camera zoom, cursor press) is a sum of closed-form spring step responses, one per change of target, summed over the current and the previous cycle; the targets return to the first state, so the values are periodic in the clip length. The cursor path interpolates keyframes cyclically and state contents depend only on time inside their state.
Tested
Rendered 360 frames on 2026-10-06 in Chrome 154.0.8037.97 headless on Linux 7.0.0-38-generic (x64), Node 22.14.0 (Canvas 2D). Same frame twice from fresh pages: identical. Loop: Frame 0 vs end state (progress 1): mean |Δ| 0.0000, max |Δ| 0 of 255.
Performance
A few dozen path and text draws per sub-frame; with motion blur each frame is drawn five times. Real time at 1080p in a browser. The content blur uses canvas filter, which Safari before 18 does not support (the swap then fades without blur).
Export a video yourself
Download the source, then in the folder: npm install npm run render -- ui-morph-loop/1.0.0 --out my-video.mp4Needs Node 18+, ffmpeg and Chrome/Chromium. Add --params my-settings.json (from Copy settings) for your own settings.
Version
1.0.0 · sha256:afb0b63ca15ebd3c…
Files
License
MIT. Copyright (c) 2026 AI Pixel Wizard. Released under the MIT License. See LICENSE in this folder. License details
Provenance
Original code written for AI Pixel Wizard on 2026-10-05 by an automated agent (the daily trend routine), inspired by the UI morph loop trend on X (see content/trends/2026-10-05-ui-morph-loop.md), started by @twoclipping's open prompt (https://x.com/twoclipping/status/2103273003555402193). The ideas of one shape that never cuts, a cursor driving each change, a camera that zooms to each state, a tab or knob whose two edges ride different springs, and values built as sums of closed-form spring step responses come from that prompt's text; no code from the post, its replies or any remix was opened or copied. All UI drawings, icons, chart data and the cursor are generated by this code; no images, fonts or icon sets are bundled.
BinMore like this