
The colour columns
Hover, SVG
The candlestick chart of a trading app, in SVG: the candles grow one after the other from the left, the crosshair snaps on a spring to the nearest candle and reads its open, high, low and close, while the others step back. The last candle keeps moving with the price, like an open market, and on a new range (a day, a week, a month, three months) every candle travels to its new size along with the scale.
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>
<!--
"Candlestick chart" 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>Candlestick chart</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">
<!-- the candlestick chart of a trading app: the candles grow one after the other, the crosshair
reads open, high, low and close, the last candle keeps ticking and the ranges reshape them all -->
<section class="cs" data-cs aria-label="Candlestick chart of Novalo Systems">
<header class="cs__top">
<span class="cs__mark" aria-hidden="true"><svg viewBox="0 0 20 20"><path d="M5.500 14.500v-9l9 9v-9"></path></svg></span>
<span class="cs__id"><b>NVLO</b><span>Novalo Systems</span></span>
<span class="cs__quote"><strong data-outprice>184.62</strong><span class="cs__chg" data-chg><svg viewBox="0 0 10 8" aria-hidden="true"><path d="M5 1 9 7H1Z"></path></svg><span class="cs__chgtext"><b data-outchg>+1.84%</b></span></span></span>
</header>
<div class="cs__read" data-read>
<span>O <b data-outo>0.00</b></span><span>H <b data-outh>0.00</b></span><span>L <b data-outl>0.00</b></span><span>C <b data-outc>0.00</b></span>
<span class="cs__when" data-outwhen>Now</span>
</div>
<div class="cs__plot" data-plot tabindex="0" role="img" aria-label="Price candles. Use the left and right arrows to read each candle.">
<svg data-svg aria-hidden="true">
<g data-grid></g>
<g data-vol></g>
<g data-candles></g>
<line class="cs__lastline" data-lastline></line>
<line class="cs__cross" data-vx></line>
<line class="cs__cross" data-hy></line>
</svg>
<span class="cs__ylab" data-ylab></span><span class="cs__ylab" data-ylab></span><span class="cs__ylab" data-ylab></span>
<span class="cs__tag cs__tag--last" data-lasttag>184.62</span>
<span class="cs__tag cs__tag--y" data-ytag>0.00</span>
</div>
<div class="cs__axis" data-axis aria-hidden="true"><span data-xlab></span><span data-xlab></span><span data-xlab></span></div>
<div class="cs__frames" role="group" aria-label="Time range" data-frames>
<span class="cs__thumb" data-thumb aria-hidden="true"></span>
<button type="button" data-frame="1D" aria-pressed="true">1D</button>
<button type="button" data-frame="1W" aria-pressed="false">1W</button>
<button type="button" data-frame="1M" aria-pressed="false">1M</button>
<button type="button" data-frame="3M" aria-pressed="false">3M</button>
</div>
</section>
<span class="live" aria-live="polite" data-live></span>
<svg class="ghost" data-ghost viewBox="0 0 24 24" aria-hidden="true"><path d="M5 3.200 19.200 11l-6.300 1.600-3.300 5.900Z"></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.
31 values to change
Works with Claude, Claude Code, ChatGPT, Cursor, VS Code, Windsurf, Codex, Gemini CLI
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 “Candlestick chart” from Animorio and fit it into my siteEvery range is a random walk with a fixed seed: for each candle an open, a high, a low, a close and a volume. At the end the series is shifted so that its last close is the price right now, so all the ranges end at the same point.
GSAP does not move the SVG elements: it moves numbers (the prices of every candle, the scale, the position of the crosshair). A single function redraws rectangles and lines from those numbers, once a frame and only if something changed.
The nearest candle is worked out from the pointer’s position. The upright line goes to its centre on a spring, the level one follows the pointer and the tag’s price is read backwards from the scale.
The candles are always the same ones: each is given its new target and goes there a little after its neighbour, while the bottom and the top of the scale move along.
| Name | File | Default | What it changes |
|---|---|---|---|
ACCENT | script.js | #2fd08a | The colour of the rising candles, the change and the mark. |
CANDLES | script.js | 26 | How many candles the chart has. |
SWING | script.js | 1 | How wide the price swings are. |
SPRING | script.js | 1 | How much the candles, the crosshair and the selector bounce. |
On the page of a stock or a coin in a trading, investing or crypto app; on a broker’s landing page, as a product piece that really moves; in a dashboard where a price has to be read over time, not just as a line.
The card is at most 344 pixels wide and narrows with the screen: the candles get thinner but all stay. The chart is at most 188 pixels tall and gets shorter on short screens. With a finger the crosshair moves by dragging sideways, and the page still scrolls vertically.
The candles are in place at once and the last one stays still. The crosshair appears on the candle without a spring, a new range redraws the chart at once and the change switches without rolling. The demo’s pointer does not start.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 9.5 KB; the libraries: GSAP 28 KB.
Tested on 27 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.
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.