Skip to content
animorio
IT
All components

Daily tarot pull

Cards, Hover, TransitionsGSAP, CSS onlyMediumCompressed weight: Demo 7.5 KBGSAP 28 KBFreeDownload the zip

The daily reading of a wellbeing app, on white: three cards face down with a fine indigo hatch on the back, Past, Present and Future, that turn over one at a time in 3D on a spring, rising and widening their shadow; on the front the card’s name in an italic serif and a thin-line symbol that draws itself. Once all three are up, the line of the day arrives word by word below. Draw again turns them back, gathers them, shuffles twice and deals them again.

The code

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>
<!--
  "Daily tarot pull" 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>Daily tarot pull</title>
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/mona-sans@5.3.0/wdth.css">
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/newsreader@5.3.0/opsz-italic.css">
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/newsreader@5.3.0/opsz.css">
  <link rel="stylesheet" href="style.css">
</head>
<body>
  <main class="stage">
    <!-- the daily reading of a wellbeing app: three cards face down, turned one at a time on a spring,
         then the line of the day arrives word by word; Draw again gathers, shuffles and deals them anew -->
    <section class="reading" data-reading aria-label="Today’s reading">
      <header class="reading__head">
        <p class="reading__title">Today’s reading</p>
        <p class="reading__date" data-date>Wed, Nov 25</p>
      </header>

      <div class="spread" data-spread>
        <div class="slot" data-slot>
          <button class="card" type="button" data-card aria-label="Turn the Past card">
            <span class="card__shadow" data-shadow aria-hidden="true"></span>
            <span class="card__lift" data-lift>
              <span class="card__inner" data-inner>
                <span class="face face--back" aria-hidden="true">
                  <span class="face__hatch"></span>
                  <svg class="face__mark" viewBox="0 0 40 40"><path d="M20 4 L36 20 L20 36 L4 20 Z"/><path d="M20 12 L28 20 L20 28 L12 20 Z"/><circle cx="20" cy="20" r="2.2"/></svg>
                  <span class="face__sheen" data-sheen></span>
                </span>
                <span class="face face--front">
                  <svg class="face__symbol" viewBox="0 0 48 48" aria-hidden="true"><g data-symbol></g></svg>
                  <span class="face__name" data-name>The Sun</span>
                  <span class="face__word" data-word>clarity</span>
                </span>
              </span>
            </span>
          </button>
          <span class="slot__label">Past</span>
        </div>
        <div class="slot" data-slot>
          <button class="card" type="button" data-card aria-label="Turn the Present card">
            <span class="card__shadow" data-shadow aria-hidden="true"></span>
            <span class="card__lift" data-lift>
              <span class="card__inner" data-inner>
                <span class="face face--back" aria-hidden="true">
                  <span class="face__hatch"></span>
                  <svg class="face__mark" viewBox="0 0 40 40"><path d="M20 4 L36 20 L20 36 L4 20 Z"/><path d="M20 12 L28 20 L20 28 L12 20 Z"/><circle cx="20" cy="20" r="2.2"/></svg>
                  <span class="face__sheen" data-sheen></span>
                </span>
                <span class="face face--front">
                  <svg class="face__symbol" viewBox="0 0 48 48" aria-hidden="true"><g data-symbol></g></svg>
                  <span class="face__name" data-name>The Moon</span>
                  <span class="face__word" data-word>intuition</span>
                </span>
              </span>
            </span>
          </button>
          <span class="slot__label">Present</span>
        </div>
        <div class="slot" data-slot>
          <button class="card" type="button" data-card aria-label="Turn the Future card">
            <span class="card__shadow" data-shadow aria-hidden="true"></span>
            <span class="card__lift" data-lift>
              <span class="card__inner" data-inner>
                <span class="face face--back" aria-hidden="true">
                  <span class="face__hatch"></span>
                  <svg class="face__mark" viewBox="0 0 40 40"><path d="M20 4 L36 20 L20 36 L4 20 Z"/><path d="M20 12 L28 20 L20 28 L12 20 Z"/><circle cx="20" cy="20" r="2.2"/></svg>
                  <span class="face__sheen" data-sheen></span>
                </span>
                <span class="face face--front">
                  <svg class="face__symbol" viewBox="0 0 48 48" aria-hidden="true"><g data-symbol></g></svg>
                  <span class="face__name" data-name>The Hermit</span>
                  <span class="face__word" data-word>solitude</span>
                </span>
              </span>
            </span>
          </button>
          <span class="slot__label">Future</span>
        </div>
      </div>

      <p class="line" data-line aria-live="polite"><span class="line__hint" data-hint>Turn the cards, one at a time.</span></p>

      <button class="again" type="button" data-again>
        <svg class="again__icon" viewBox="0 0 20 20" aria-hidden="true"><path d="M3 6h3.2c1.6 0 2.6.7 3.5 2l1.6 2.4c.9 1.3 1.9 2 3.5 2H17"/><path d="M14.6 10.2 17 12.6l-2.4 2.4"/><path d="M3 14h3.2c1 0 1.8-.3 2.4-.9"/><path d="M11.4 6.9c.6-.6 1.4-.9 2.4-.9H17"/><path d="M14.6 3.6 17 6l-2.4 2.4"/></svg>
        <span class="again__label">Draw again</span>
      </button>
    </section>
  </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.

28 values to change

Works with Claude, Claude Code, ChatGPT, Cursor, VS Code, Windsurf, Codex, Gemini CLI

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 “Daily tarot pull” 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 white, the daily reading of a wellbeing app: at the top ‘Today’s reading’ in a serif and today’s date, with a thin rule below. Then three cards face down in a row, with an indigo back, a thin white frame and a hatch of crossing lines, a line diamond in the middle; under each the label Past, Present, Future. Hover a face-down card and it rises a little while a sheen crosses its back; pressed, it gives. On click the card rises, turns over in 3D with a small swing past flat and settles on a spring, while the shadow below widens and comes back; on the paper-coloured front the thin-line symbol draws itself (the sun with its rays, the crescent moon, the hermit’s lantern, the wheel, the infinity sign, the two circles, the tower, the world) and the italic name and the keyword rise. Once all three are up, the line of the day arrives word by word below, with the present’s word in indigo italic. Draw again turns the cards back, gathers them on the middle one, shuffles twice and deals them again on a spring. If nobody touches the page, the reading turns and reshuffles by itself.

How it works

A card in three layers

The button holds the perspective, inside sit the layer that rises (card__lift) and the one that turns (card__inner), both with transform-style: preserve-3d; the two faces have backface-visibility: hidden and the front is already turned 180 degrees in the CSS. GSAP only animates the layers, never the faces.

The turn on a spring

rotationY from 0 to 180 with back.out(1.6): the card goes a few degrees past flat and comes back. At the same time the layer above rises 9% and grows to 1.05, then drops back with elastic.out, and the blurred shadow below widens and lightens.

The symbol drawing itself

The symbol is a small line svg: the script gives each element pathLength 1 and stroke-dashoffset 1, and on the turn takes it to 0, 0.05 seconds apart. autoRound is turned off at the top of the script, so the lines really draw.

The line word by word

Once the three cards are up, the line is built from the past line of the first, the present of the second and the future of the third; each word is a span rising from yPercent 55 and blur(4px), 0.045 seconds apart. The word between asterisks becomes indigo italic.

Gather and shuffle

Draw again measures with getBoundingClientRect how far each card has to travel to reach the middle one, takes them there with a small rotation, then slides one card out sideways twice changing its z-index halfway, and deals them again with back.out. The draws follow a fixed order, so the reading is always the same when the page opens.

Values to change

NameFileDefaultWhat it changes
FLIP_TIMEscript.js0.95The seconds a card takes to turn over.
OVERSHOOTscript.js1.6How far the card swings past flat before it settles (0 = no swing).
LIFTscript.js9How high the card rises while it turns, in % of its height.
DEAL_GAPscript.js0.6The seconds between one card and the next when the reading turns itself.
WORD_GAPscript.js0.045The seconds between the words of the line of the day.
LOOP_PAUSEscript.js3.4The seconds the reading stays open before it reshuffles by itself.
HINTscript.jsTurn the cards, one at a time.The line shown while the cards are face down.
--accentostyle.css#3e3a8fThe one accent colour: the card backs, the symbols, the keyword and the present’s word.

Try them in the Playground

When to use it

In a wellbeing, meditation, astrology or horoscope app or site: the card or reading of the day, a morning ritual, a ‘your day’ section, or a newsletter that gives one line a day.

On phones

Everything is in em and the size depends on both the width and the height of the window, so the three cards, the line and the button fit in the phone box. A tap does what a click does; the hover sheen is only there with a mouse. Below 360 pixels the date hides.

With reduced motion

No 3D turns or springs: the card fades out and back with its front already drawn, the words of the line fade in and Draw again swaps the cards with a fade, without gathering or shuffling them.

Pitfalls

  • The perspective goes on the button, not on the row: a container without preserve-3d in between flattens the turn and the back would show through the front.
  • GSAP writes the transform on the layers: the front turned 180 degrees lives in the CSS on an element GSAP never touches, otherwise its inline transform would wipe it.
  • With pathLength 1 GSAP rounds stroke-dashoffset to 0 or 1 and the symbol appears at once: autoRound is turned off at the top of the script.
  • When gathering, the offset is measured in pixels at the moment of the click and the cards always end back at x 0, so a window resize halfway never leaves a card out of place.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0, Newsreader (font variabile) 5.3.0.

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

Testing

Tested on 25 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 components