
Tiles that rise
SVG, Hover, Physics
The portfolio card of an invented investing app, Corvane, dark and clean like a Dribbble shot: the SVG value line with its faded area underneath behaves like a taut string. Dragging the crosshair the point follows it, the value and the date in the glass tag roll digit by digit and the change turns coral below the start; pressing pulls the string a few pixels towards the finger. Letting go, the crosshair springs back to ‘Now’, knocks on the end and the line hums for a moment before it settles. 1D, 1W, 1M and 1Y redraw the line point by point, each on its own spring.
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>
<!--
"Portfolio chart crosshair" 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 portfolio chart with a spring crosshair and a line that hums like a string</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>
<!-- one gesture: drag. The portfolio card of an investing app. The value line is a taut string: dragging the
crosshair along it the point follows, the value and the date roll, and pressing pulls the string a little;
letting go, the crosshair springs back to now and the line hums for a moment. 1D 1W 1M 1Y morph the line
point by point, each point on its own spring -->
<section class="card" data-card aria-label="Corvane portfolio">
<header class="card__head">
<span class="card__brand">
<svg class="card__mark" viewBox="0 0 20 20" aria-hidden="true">
<path d="M3 13.2 7.4 8.6l3.2 2.8L17 5"></path>
<path d="M12.6 5H17v4.4"></path>
</svg>
<span class="card__name">Corvane</span>
</span>
<span class="card__span" data-span>Past day</span>
</header>
<div class="card__value" data-value aria-live="polite"></div>
<div class="card__change" data-change>
<span class="chip" data-chip>
<svg class="chip__arrow" data-chip-arrow viewBox="0 0 12 12" aria-hidden="true"><path d="M6 9.5V2.8M2.9 5.7 6 2.6l3.1 3.1"></path></svg>
<span class="chip__amount" data-delta></span>
</span>
<span class="card__pct" data-pct></span>
</div>
<div class="chart" data-chart>
<svg class="chart__svg" data-svg aria-hidden="true">
<defs>
<linearGradient id="pf-area" x1="0" y1="0" x2="0" y2="1">
<stop class="stop-acc" offset="0" stop-opacity="0.30"></stop>
<stop class="stop-acc" offset="0.55" stop-opacity="0.08"></stop>
<stop class="stop-acc" offset="1" stop-opacity="0"></stop>
</linearGradient>
<linearGradient id="pf-hair" x1="0" y1="0" x2="0" y2="1">
<stop offset="0" stop-color="#ffffff" stop-opacity="0"></stop>
<stop offset="0.25" stop-color="#ffffff" stop-opacity="0.42"></stop>
<stop offset="1" stop-color="#ffffff" stop-opacity="0.04"></stop>
</linearGradient>
<radialGradient id="pf-light" data-light gradientUnits="userSpaceOnUse" cx="0" cy="0" r="64">
<stop offset="0" stop-color="#ffffff" stop-opacity="0.95"></stop>
<stop offset="1" stop-color="#ffffff" stop-opacity="0"></stop>
</radialGradient>
<radialGradient id="pf-halo">
<stop class="stop-acc" offset="0" stop-opacity="0.55"></stop>
<stop class="stop-acc" offset="0.45" stop-opacity="0.16"></stop>
<stop class="stop-acc" offset="1" stop-opacity="0"></stop>
</radialGradient>
<clipPath id="pf-past"><rect data-past x="0" y="0" width="0" height="0"></rect></clipPath>
<clipPath id="pf-future"><rect data-future x="0" y="0" width="0" height="0"></rect></clipPath>
</defs>
<g class="grid" data-grid></g>
<line class="base" data-base x1="0" x2="0" y1="0" y2="0"></line>
<g data-plot>
<path class="area" data-area clip-path="url(#pf-past)" fill="url(#pf-area)"></path>
<path class="line line--future" data-line-future clip-path="url(#pf-future)"></path>
<path class="line" data-line clip-path="url(#pf-past)"></path>
<path class="line line--light" data-line-light clip-path="url(#pf-past)" stroke="url(#pf-light)"></path>
</g>
<g class="cross" data-cross>
<line class="cross__hair" data-hair x1="0" x2="0" y1="0" y2="0" stroke="url(#pf-hair)"></line>
<circle class="cross__halo" data-halo r="22" fill="url(#pf-halo)"></circle>
<circle class="cross__ring" data-ring r="7"></circle>
<circle class="cross__dot" data-dot r="4.2"></circle>
<circle class="cross__shine" data-shine r="1.3"></circle>
</g>
</svg>
<div class="tag" data-tag>
<span class="tag__value" data-tag-value></span>
<span class="tag__date" data-tag-date></span>
</div>
</div>
<div class="axis" data-axis><span></span><span></span><span></span></div>
<nav class="tabs" data-tabs aria-label="Period">
<span class="tabs__pill" data-pill aria-hidden="true"></span>
<button class="tabs__tab" type="button" data-period="1D" aria-pressed="true"><span>1D</span></button>
<button class="tabs__tab" type="button" data-period="1W" aria-pressed="false"><span>1W</span></button>
<button class="tabs__tab" type="button" data-period="1M" aria-pressed="false"><span>1M</span></button>
<button class="tabs__tab" type="button" data-period="1Y" aria-pressed="false"><span>1Y</span></button>
</nav>
</section>
<svg class="ghost" data-ghost viewBox="0 0 24 24" aria-hidden="true"><path d="M5 3.2 19.2 11l-6.3 1.6-3.3 5.9Z"></path></svg>
</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.
25 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 “Portfolio chart crosshair” from Animorio and fit it into my siteThe line is an SVG in real pixels (the viewBox is rebuilt on resize): forty evenly spaced points joined by Bézier curves with Catmull-Rom tangents. The same Hermite polynomial gives the curve's height anywhere, so the crosshair always sits on the line, even between two points.
Each point has its own offset following the wave equation: tension between neighbours, a little friction, both ends fixed. The tension comes from HUM, vibrations per second, and is integrated in small steps per frame, small enough to stay stable. Pressing pulls the point under the finger towards it; released, the string hums on its own.
While dragged the crosshair chases the finger on a stiff spring with almost no bounce; released, a softer spring brings it back to ‘Now’. The end is a wall: it knocks on it, bounces back a third and gives a small push to the last points of the string, which hums even when it was never pulled.
Value, date, change and period are made of slots, one per character: when a character changes the old one leaves upwards and the new one comes in from below in the same grid cell, with a one pixel overshoot. Only what changes rolls, in the direction the crosshair goes, and quicker while it is dragged.
Changing the period each point gets its new height a few milliseconds after its left neighbour and runs there on its own spring: the line redraws like a wave. The period pill slides with a bounce, the start line moves and the dates underneath change with a fade.
| Name | File | Default | What it changes |
|---|---|---|---|
POINTS | script.js | 40 | How many points make the line. |
HUM | script.js | 3.4 | How fast the string hums after a release, in vibrations per second. |
SETTLE | script.js | 1.1 | How long the hum lasts, in seconds. |
PULL | script.js | 1 | How much pressing pulls the string towards the finger (0 = not at all). |
RETURN_STIFFNESS | script.js | 80 | The spring that brings the crosshair back to now: higher is quicker. |
RETURN_DAMPING | script.js | 9.5 | Lower lets the crosshair knock harder on the end and bounce. |
MORPH_STIFFNESS | script.js | 170 | The spring of each point when the period changes. |
MORPH_DAMPING | script.js | 18 | Lower lets each point pass its height and come back. |
MORPH_STAGGER | script.js | 0.012 | Seconds between a point and the next one when the period changes. |
LOOP | script.js | true | The drawn pointer plays the card again and again. |
For the home screen of an investing app or an online bank, an account dashboard, the page of a financial product or the showcase of a fintech startup: the chart people want to touch.
The same animation with adapted sizes: the card is as wide as the box, the chart is measured on the height too, the tag always stays inside the card and a finger drags the crosshair; vertical page scrolling stays free.
No springs, no hum, no rolling figures: the line is already in place, the crosshair goes where you touch and returns to Now without travelling, the numbers change at once and a period change is a fade.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 12 KB; the libraries: GSAP 28 KB.
Tested on 6 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.