LoneForgeMotion
Library
Interface  /  Minimal

Swipe Unlock

A knob with a padlock slides across a track past rippling arrows, unlocks with a glow, and resets.

Source kit 8 KB
Loop
8 s, seamless
Video
1080p, 30 fps, no sound
Built with
HTML canvas, one file
Made with
Claude Fable 5.2, medium effort

The prompt

The prompt this loop was built from. Paste it into your agent to make your own version from the idea.

Can we create 10 of them, they should be minimalist ones, like a digital high quality toggle switch, or an push last on/off switch, or like the swipe to unlock, animations that people could easily convert to other file formats or feed it to AI to build those to actual features in a website (e.g button, loading screen when logging in, and etc. /motion-animation

Build spec:
Make a seamless 8 second loop of a swipe to unlock control.

A wide pill track sits in the center with a thin border. At its left end is a round knob in the first accent color with a small padlock icon on it. The padlock starts fully closed, with both legs of the shackle seated in the body and no gap. Inside the track, a row of five small chevrons points right, and a wave of brightness runs along them over and over to invite the swipe. From about 14 to 44 percent of the loop the knob glides to the right end of the track. A soft fill in the second accent color grows behind it, and each chevron fades out as the knob reaches it. When the knob arrives, it eases into the second accent color and the padlock unlatches in two clear steps: first the shackle lifts straight up until its short leg clears the body, then it swings open to the side. As it swings, a thin ring expands from the knob and fades, and a glow appears around it. It holds unlocked, then from about 84 to 95 percent the shackle swings back and drops shut, the knob slides back to the left, and the chevrons return.

Keep it minimal: one component in the center of a plain background with a soft light in the middle, and nothing else on screen. Write it as one JavaScript file that draws on an HTML canvas with the 2D context. One function draws any moment: render(ctx, W, H, ph, colors), where ph is the loop phase from 0 to 1. Every state change eases in and out, and everything returns to its starting state before the loop ends so there is no seam. No text, no logos, no images, no libraries. Scale every size from the shorter side of the canvas so it works wide, vertical and square. Take three colors as inputs: a background and two accents. Pick neutral grays from whether the background is light or dark, so it works on both.

The source kit

Download

The same code that is drawing the loop on this page. Unzip it, point your agent at START-HERE.md, and it can rebuild the loop and change it.

  • LICENSE.txt1 KB
  • PROMPT.md2 KB
  • START-HERE.md1 KB
  • animation.js4 KB
  • core.js2 KB
  • index.html1 KB
  • render.py2 KB

Free to use and change for your own work. See the license.