
The shattering frame
Images, Physics
A physics and image animation on a real panel: the wallpaper picker of a phone launcher, nine abstract wallpapers painted in a canvas (silk, dunes, orbits, fluted glass, mesh gradients) in a row of lock screen previews. Fling it with a finger: it glides on its inertia, slows down on its friction, stretches like rubber past the first and the last one and settles on a spring on the nearest wallpaper. Every preview follows on a spring of its own, leans with its speed and its picture slides inside the frame as behind a window; the lights behind the panel take the colours of the wallpaper in the middle and the button applies it.
A folder that runs on its own: index.html, style.css, script.js and the libraries from a CDN. The React and Vue tabs hold the same demo as a ready component, which switches its animations off when it leaves the page.
<!doctype html>
<!--
"Wallpaper picker" from Animorio · https://animorio.com
License: free on your own sites and your clients’ sites, paid work included.
Not for resale, redistribution, templates or code collections · https://animorio.com/en/license/
-->
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>The wallpaper picker to fling with inertia</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/mona-sans@5.3.0/wdth.css">
<link rel="stylesheet" href="style.css">
</head>
<body>
<main class="stage" data-stage>
<!-- the Wallpaper sheet of Lumen, an invented phone launcher. Nine abstract wallpapers, painted in a canvas,
stand in a row of lock screen previews: fling it and it glides, slows down on its friction, stretches like
rubber past the last one and settles on a spring on the nearest. Every preview follows on a spring of its
own, leans with the speed, and its picture slides inside the frame like a window. The light behind the
sheet takes the colours of the wallpaper in the middle; the button below applies it -->
<section class="sheet" aria-labelledby="sheet-title" data-sheet>
<span class="sheet__rim" aria-hidden="true"></span>
<header class="sheet__head">
<div>
<h1 class="sheet__title" id="sheet-title">Wallpaper</h1>
<p class="sheet__sub">Lumen Studio collection</p>
</div>
<p class="sheet__count"><span class="count__now" data-count>1</span><span class="sheet__of">of 9</span></p>
</header>
<div class="track" data-track aria-label="Drag to browse the wallpapers" role="group">
<span class="track__floor" aria-hidden="true"></span>
<div class="track__layer" data-layer></div>
</div>
<div class="dial" aria-hidden="true">
<div class="dial__ticks" data-ticks></div>
<svg class="dial__caret" viewBox="0 0 10 6"><path d="M1 0.5h8L5 5.5z"/></svg>
</div>
<footer class="foot">
<div class="foot__words">
<p class="foot__name" data-name>Aurora Silk</p>
<p class="foot__meta" data-meta>Silk series, 4K</p>
</div>
<button class="apply" type="button" data-btn>
<span class="apply__shine" aria-hidden="true" data-btnshine></span>
<span class="apply__face" data-face>
<svg class="apply__icon" viewBox="0 0 16 16" aria-hidden="true">
<path class="apply__frame" data-frame d="M4.5 2.5h7a1.5 1.5 0 0 1 1.5 1.5v8a1.5 1.5 0 0 1-1.5 1.5h-7A1.5 1.5 0 0 1 3 12V4a1.5 1.5 0 0 1 1.5-1.5zM6.5 11h3"/>
<circle class="apply__spin" data-spin cx="8" cy="8" r="5.4" pathLength="1"/>
<path class="apply__check" data-check pathLength="1" d="M3.6 8.4l2.9 2.9 5.9-6.3"/>
</svg>
<span class="apply__words" data-words>Set wallpaper</span>
</span>
</button>
</footer>
</section>
<p class="sr" aria-live="polite" data-live></p>
</main>
<script src="https://cdn.jsdelivr.net/npm/gsap@3.15.0/dist/gsap.min.js"></script>
<script src="script.js"></script>
</body>
</html>Change values, colours and text with the controls and watch the animation respond live. Or write in the code yourself. Then download the folder with your changes.
24 values to change
With the Animorio connector, Claude Code, ChatGPT, Cursor or VS Code take it from here, guide included, and fit it into your project. Paste this request:
Take “Wallpaper picker” from Animorio and fit it into my siteEach wallpaper is a canvas painted only once at the preview's size: patches of colour with radial gradients added up in ‘lighter’ mode, then its shape (fifty silk threads folding on two sines, six dunes filled with a gradient and a light crest, an orb with thin rings, nine flutes copying the picture shifted and squeezed), a vignette and the grain pixel by pixel. A generator with a fixed seed always paints it the same.
While dragging, the speed is read from the last 90 ms of the finger. On release, the point where the row would stop is projected (position plus speed times FRICTION seconds), the wallpaper nearest to that point is chosen and a spring (STIFFNESS, DAMPING) carries it there starting with the finger's speed: it glides, passes the mark by a hair and settles.
Before the first wallpaper and after the last the offset is squeezed with 1 − 1/(x·RUBBER/reach + 1), the curve of the rubber edges of phones: the harder you pull, the less it moves, and on release the spring brings it back inside.
Every preview follows the row on a spring of its own, stiff near the finger and softer far from it (LAG), so the far ones arrive a beat later. Its speed becomes a lean of a few degrees (LEAN) and stretches the shadow beneath; the picture, wider than the frame, slides against its distance from the middle (PARALLAX) like a landscape behind a window.
Each wallpaper has two light colours. Every frame those of the two wallpapers the row sits between are mixed by the position, and they become the two lights behind the panel, the rim that follows the pointer, the pool under the middle preview and the button's shadow. The time in the middle gains weight and width on the font's variable axes.
| Name | File | Default | What it changes |
|---|---|---|---|
FRICTION | script.js | 0.32 | How far a flick glides: the throw is projected this many seconds ahead. |
STIFFNESS | script.js | 170 | The spring that settles the row on a wallpaper: higher is quicker. |
DAMPING | script.js | 20 | Lower lets the row pass the wallpaper and come back. |
LAG | script.js | 0.55 | How far the distant previews trail behind the near ones (0 = one rigid row). |
LEAN | script.js | 1 | How much each preview leans with its speed (0 = upright). |
PARALLAX | script.js | 0.8 | How far the picture slides inside its frame (0 = glued to the frame). |
RUBBER | script.js | 0.55 | How hard the row resists past the first and the last wallpaper. |
SPEED | script.js | 1 | 2 = the walk on its own twice as fast, 0.5 = half. |
LOOP | script.js | true | Repeats the walk on its own. |
To pick the wallpaper or the theme in an app, a profile cover, a product colour, one photo among many in an onboarding or an editor: when the pictures are few and large and you want to browse them with a thumb, with the physical feel of a real phone.
The same animation with adapted sizes: the panel is as wide as the box, the row is as tall as the screen allows and the previews are sized on both dimensions; the wallpapers are repainted at the new size; the row takes the finger without scrolling the page.
The row neither glides nor leans and the pictures stay still: changing wallpaper it lands in place at once, the name changes with a fade and the button turns to ‘Applied’ and its check without a spring.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 14 KB; the libraries: GSAP 28 KB.
Tested on 3 November 2026
Use it in your own projects and in your clients’ projects. Do not resell it or redistribute it as is. GSAP stays under its own Standard license. Full license.
Support Animorio
Animorio stays free thanks to the people who support it. If you like, buy us a coffee: it helps us make the next animations.
You asked for
We made it for you: it’s in the library, with the preview, the Playground and the code to copy.
An animation you can’t find, or a site to take apart in the journal: tell us which. We pick the next ones from here.
With your account’s email and password.
or with your email
You’re signed in as .
With your account, you can download the zip of every animation and every pack, for free.