
Ink that reveals
WebGL, Hover
A minimal WebGL animation: the Pro plan card of an AI image app, dark on a near black page, crossed by the light of an anamorphic lens, the kind that squeezes a bright point into one long horizontal line. A single white thread with a blue haze, a 2D shader that follows the pointer on a spring, the card's edge lighting up only where it touches it and the price catching the light as it passes. Pressing Upgrade the light flares wide for an instant.
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>
<!--
"Anamorphic plan card" 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 plan card with the anamorphic light</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 Pro plan card of an AI image tool. Behind its words a WebGL shader draws the light of an anamorphic lens:
one thin horizontal streak, long and blue, with a small bloom where it starts, two faint ghosts on the other
side of the card and the edge of the card catching it. The streak follows the pointer on a spring -->
<div class="plan" data-plan>
<canvas class="plan__light" data-canvas aria-hidden="true"></canvas>
<span class="plan__flare" data-flare aria-hidden="true"><span class="plan__flare-line"></span></span>
<article class="plan__card" data-card>
<header class="plan__head">
<span class="plan__name">Pro</span>
<span class="plan__chip">Most chosen</span>
</header>
<p class="plan__price"><span class="plan__amount" data-amount>$24</span><span class="plan__per">/ month</span></p>
<p class="plan__line">Unlimited renders, 4K upscale and the priority queue for Halden Studio.</p>
<span class="plan__rule" aria-hidden="true"></span>
<button class="plan__btn" type="button" data-btn>
<span class="plan__btn-face" data-face>
<span class="plan__btn-words" data-words>Upgrade to Pro</span>
<svg class="plan__btn-icon" viewBox="0 0 16 16" aria-hidden="true">
<path class="plan__arrow" data-arrow d="M3 8h9M8.5 4.2L12.3 8 8.5 11.8"/>
<path class="plan__check" data-check pathLength="1" d="M3.4 8.4l3 3 6.2-6.6"/>
</svg>
</span>
</button>
</article>
</div>
<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.
23 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 “Anamorphic plan card” from Animorio and fit it into my siteThe light is a WebGL shader on a single triangle covering a canvas a little wider than the card, centred on it, so the line can go past the edges. Underneath is the card's body (a layer of its own), on top the words and the button.
The core is a very narrow vertical gaussian (1.3 px) times a horizontal exponential half the card long; the haze is the same, wider and shorter. The core cubed turns white, the rest takes the blue from the CSS. A slow sine makes it breathe along the line.
Two faint ovals sit opposite the source through the middle, as in real lenses. The signed distance from the card's rounded rectangle lights the edge only at the line's height, and outside the card the light drops to a third and fades over 46 px.
The source chases the pointer (or the walk on its own, a GSAP timeline) on a spring integrated by hand, stiffness 170 and damping 17, in two steps per frame: it passes the mark by a pixel and settles. The intensity has its own spring too.
The price is text with a clipped background: a vertical gradient whose bright band sits at the line's height, moved every frame with a CSS variable. On a press a timeline takes the pressure to 1 in 0.12 s and back to zero in 1.3 s: the line gets two and a half times longer and thicker.
| Name | File | Default | What it changes |
|---|---|---|---|
LENGTH | script.js | 0.55 | How long the line is, as a share of the card's width. |
THICKNESS | script.js | 1.3 | The thickness of the white core, in pixels. |
GLOW | script.js | 1 | How bright the light is. |
GHOSTS | script.js | 0.6 | How visible the two ghosts on the other side are. |
SPILL | script.js | 0.32 | How much light spills past the card onto the page. |
STIFFNESS | script.js | 170 | The spring pulling the light to the pointer: higher is quicker. |
DAMPING | script.js | 17 | Lower lets the light pass the mark and come back. |
SPEED | script.js | 1 | 2 = the walk on its own twice as fast, 0.5 = half. |
LOOP | script.js | true | Repeats the light's walk. |
For the pricing page of an AI app, a video or photo tool, a SaaS service: the recommended plan card that has to draw the eye without shouting.
The same animation with adapted sizes: the card is as wide as the box allows, the margins shrink with the height, the light spills sideways only as far as there is room, and a finger takes it where it touches.
The light does not move: it stays still at the price's height and fades in and out; pressing the button, the label and the checkmark change with a fade.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 8.0 KB; the libraries: GSAP 28 KB.
Tested on 1 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.