Skip to content
animorio
IT
Back to the library

Watchlist transition

Transitions, HoverGSAP, CSS onlyAdvancedCompressed weight: Demo 13 KBGSAP 28 KBFreeDownload the zip

The transition of an invented investing app, Ledgerly, dark and clean like a Dribbble shot: tapping a stock in the watchlist, the row itself becomes its page. The plate grows to the whole app, logo, ticker, name, price and change fly to their places and grow, and the small line of the day widens into the big chart, with its light, its soft fill and the dashed line of the last close. The other rows step back into the dark, out of focus. A finger scrubs the chart and the price rolls figure by figure, 1D 1W 1M 1Y bend the line into the new one, and Watchlist makes the whole trip back to the right row.

The code

A folder that runs on its own: index.html, style.css, script.js and the libraries from a CDN.

<!doctype html>
<!--
  "Watchlist transition" 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 watchlist to stock chart transition</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 watchlist of an invented investing app, Ledgerly. Tapping a row, the row itself becomes the stock's page:
         its plate grows into the sheet, the logo, the ticker, the name, the price and the change fly to their places,
         and the small line of the row widens into the big chart. The other rows step back into the dark. Back makes
         the same trip the other way, down to the right row -->
    <div class="app" data-app>
      <span class="app__light" aria-hidden="true"></span>

      <section class="list" data-list aria-label="Watchlist">
        <header class="list__head" data-head>
          <div>
            <p class="list__kicker">Ledgerly</p>
            <h1 class="list__title">Watchlist</h1>
          </div>
          <div class="list__total">
            <span class="list__sum">$48,210.55</span>
            <span class="list__day">+$612.40 today</span>
          </div>
        </header>
        <div class="list__rows" data-rows></div>
      </section>

      <span class="plate" data-plate aria-hidden="true"></span>

      <section class="detail" data-detail aria-hidden="true">
        <div class="detail__bar" data-in>
          <button class="detail__back" type="button" data-back aria-label="Back to the watchlist">
            <svg viewBox="0 0 20 20" aria-hidden="true"><path d="M12.2 4.6L6.8 10l5.4 5.4"/></svg>
            <span>Watchlist</span>
          </button>
          <button class="detail__save" type="button" data-save aria-label="Saved to the watchlist" aria-pressed="true">
            <svg viewBox="0 0 20 20" aria-hidden="true"><path d="M5.6 3.6h8.8v13l-4.4-3.2-4.4 3.2z"/></svg>
          </button>
        </div>
        <div class="detail__head">
          <span class="logo" data-d-logo></span>
          <div class="detail__names">
            <span class="detail__ticker" data-d-ticker></span>
            <span class="detail__sub"><span class="detail__name" data-d-name></span><span class="detail__ex" data-in data-d-ex></span></span>
          </div>
        </div>
        <p class="detail__price" data-d-price></p>
        <p class="detail__move">
          <span class="pill" data-d-change></span>
          <span class="detail__delta" data-in data-d-delta></span>
        </p>
        <div class="detail__chart" data-chart></div>
        <div class="tabs" data-in data-tabs role="tablist" aria-label="Range">
          <span class="tabs__pill" data-tab-pill aria-hidden="true"></span>
          <button class="tabs__tab is-on" type="button" role="tab" data-range="1D">1D</button>
          <button class="tabs__tab" type="button" role="tab" data-range="1W">1W</button>
          <button class="tabs__tab" type="button" role="tab" data-range="1M">1M</button>
          <button class="tabs__tab" type="button" role="tab" data-range="1Y">1Y</button>
        </div>
        <dl class="stats" data-in data-stats></dl>
        <button class="buy" type="button" data-in data-buy><span class="buy__words" data-buy-words>Buy</span></button>
      </section>

      <svg class="line" data-line aria-hidden="true">
        <defs>
          <linearGradient id="wl-fill" x1="0" y1="0" x2="0" y2="1">
            <stop offset="0" stop-color="currentColor" stop-opacity="0.26"/>
            <stop offset="1" stop-color="currentColor" stop-opacity="0"/>
          </linearGradient>
        </defs>
        <path class="line__area" data-area fill="url(#wl-fill)"/>
        <line class="line__base" data-base/>
        <path class="line__glow" data-glow/>
        <path class="line__path" data-path/>
        <g class="line__cross" data-cross>
          <line class="line__cross-x" data-cross-x/>
          <circle class="line__ring" data-ring r="4.5"/>
          <text class="line__when" data-when text-anchor="middle"></text>
        </g>
      </svg>
    </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>

Playground

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.

29 values to change

Or ask your AI assistant for it

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 “Watchlist transition” from Animorio and fit it into my site
Platform licenseFree on your sites and your clients’ sites. Want it inside a website builder, a template platform or a client dashboard? There’s a license for agencies and platforms.

What it does

On a near black page, with a faint green light at the top and a fine grain, sits the dark panel of Ledgerly, an invented investing app, its 1px edges catching the light. At the top ‘Watchlist’ and the portfolio total, below six stocks: each with its logo on a gradient tile, the ticker, the name, a small line of the day in green or red, the price and the change in a pill. A row brightens under the finger, gives a little and opens: its plate grows to fill the whole app, the logo, the ticker and the name rise and grow, the price comes down on an arc to become the big price and the pill follows it, while the small line widens into the whole chart, thicker, with its soft light under it, the fading fill and the dashed line of yesterday's close. The other rows step back, the ones above going up and the ones below going down, smaller and out of focus, the nearest first. Then, staggered with a little bounce, come the Watchlist button with its arrow, the bookmark, the 1D 1W 1M 1Y tabs, the day's figures and the light ‘Buy KSTR’ button. The finger scrubs the chart: a vertical hairline and a small ring follow the line, the time shows above and the big price rolls figure by figure. Tapping 1W the pill slides on a spring and the line bends into the new one, the change updates. Tapping Watchlist everything makes the trip back: the line shrinks into the row, the plate closes, the other rows come back into focus with a pixel of bounce and the row settles. On its own it opens a stock going up and one going down, forever.

How it works

Three layers and one line

The panel holds the list, the plate (a layer over everything, cut with clip-path), the stock's page and on top of everything a single SVG as big as the panel that draws the line. The page is already built in its place, invisible: the transition brings it there from the row.

FLIP for the shared pieces

For the logo, ticker, name, price and pill the position in the row and in the page are measured; the page's piece starts moved and scaled down over the row's (which hides) and goes home with a GSAP timeline. The price and the pill travel on an arc, x and y on two different curves, so they never cross the name.

The line that widens

The line is always the same function: the 48 prices laid in a rectangle and smoothed with Catmull-Rom. The rectangle goes from the small line's to the chart's, the thickness from 1.4 to 2 px, and the light under it, the fill and the close line come on near the end.

The plate and the rest of the list

The plate's clip-path goes from the row's rectangle to the whole panel, its corner from 14 px to the app's. The other rows step back on y by their distance, scale to 0.95 and blur; on the way back they return with back.out, a pixel past and back.

Rolling price, tabs and crosshair

Each figure of the big price is a column of 0 to 9 moved with yPercent. Under the finger the crosshair finds the nearest point of the line and the price rolls to it. The tabs move their pill on a spring and the 48 values pass to the new ones.

Values to change

NameFileDefaultWhat it changes
OPEN_TIMEscript.js0.9The seconds of the transition, both ways.
DEPTHscript.js26How far the other rows step back, in pixels.
BLURscript.js3How out of focus the other rows go, in pixels.
LINE_WIDTHscript.js2The thickness of the big chart's line.
GLOWscript.js0.45How much light the line throws.
HOLDscript.js12 = the stock's page stays open twice as long in the walk on its own.
SPEEDscript.js12 = the walk on its own twice as fast, 0.5 = half.
LOOPscript.jstrueRepeats the walk.

Try them in the Playground

When to use it

For a finance, investing or crypto app, a market dashboard, a portfolio: anywhere a list of rows with a small chart has to open into the detail without losing the thread. The same pattern works for any list whose thumbnail becomes the big part of the page.

On phones

The same transition with adapted sizes: the panel is as tall as the screen up to 580 px, the rows shrink with the height, the day's figures show only when there is room, and a finger scrubs the chart like the pointer.

With reduced motion

Nothing moves: the list fades out and the stock's page fades in in its place, the tabs change the line with a fade and the price changes without rolling.

Pitfalls

  • The price goes from the right of the row to the left of the page, and in a straight line it passed over the name: with x and y on two different curves it makes an arc and crosses nothing.
  • Closing after changing tab, the line has to go back to the day's line while it shrinks, otherwise a different line from the one in the row arrives and the jump shows.
  • The row's small line and the one the big SVG draws on the first frame must be the same function with the same thickness: that is why both go through points() and smooth().

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.

Compressed with gzip, the three demo files weigh 13 KB; the libraries: GSAP 28 KB.

Testing

Tested on 2 November 2026

  • Desktop: Done
  • Phone: Done
  • Reduced motion: Done
  • Safari on iPhone: To do

License

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.

All animations