Skip to content
animorio
IT
All components

Shareable quote card

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

The reading card of Low Tide Review, a made-up online magazine, alone on white in the premium product style. Tap the best sentence of the article: the sea-green highlighter runs over it line by line and the dark selection bar slides up below. Share quote lifts the sentence out of the paragraph: the quote card is born from the exact shape of the sentence and opens into an image with quote marks, author and magazine, on paper, tide green or ember, with a light sweeping across it at every change. Copy image flashes like a shutter and draws a tick; back in the article the share count rolls up by one.

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>
<!--
  "Shareable quote 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 shareable quote that lifts out of the paragraph into a card</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/fraunces@5.3.0/full.css">
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/fraunces@5.3.0/full-italic.css">
  <link rel="stylesheet" href="style.css">
</head>
<body>
  <main class="stage">
    <!-- the reading card of a made-up online magazine: tap the sentence, it is highlighted, a small toolbar springs
         up; Share quote lifts the sentence out of the paragraph into an image card with a background to choose -->
    <section class="reader" data-reader aria-label="Article excerpt">
      <span class="reader__light" aria-hidden="true"></span>

      <div class="faces">
        <!-- the article face -->
        <div class="face face--article" data-article>
          <header class="meta">
            <span class="mark" aria-hidden="true">
              <svg viewBox="0 0 24 24"><path d="M4 9.5c2.7-2 5.3-2 8 0s5.3 2 8 0M4 14.5c2.7-2 5.3-2 8 0s5.3 2 8 0" /></svg>
            </span>
            <span class="meta__brand" data-brand>Low Tide Review</span>
            <span class="meta__time">Essay · 6 min read</span>
          </header>

          <h2 class="title">Learning to walk at the speed of the coast</h2>

          <p class="body" data-body>We tend to think of patience as waiting. On the cliff path it felt closer to attention.
            <mark class="hl" data-hl tabindex="0" role="button" aria-label="Select this sentence to share it">The coast does not change when you stop to look at it; you do.</mark>
            By the third morning I had stopped counting the miles.</p>

          <footer class="byline">
            <span class="avatar" aria-hidden="true">MH</span>
            <span class="byline__txt">
              <span class="byline__name" data-author>Maren Holt</span>
              <span class="byline__date">Nov 12, 2026</span>
            </span>
            <span class="shares" aria-label="Shares">
              <svg viewBox="0 0 20 20" aria-hidden="true"><path d="M10 12.5V3.2M6.6 6.4 10 3l3.4 3.4M5.5 9.2H5a1.6 1.6 0 0 0-1.6 1.6v4.6A1.6 1.6 0 0 0 5 17h10a1.6 1.6 0 0 0 1.6-1.6v-4.6A1.6 1.6 0 0 0 15 9.2h-.5" /></svg>
              <span class="shares__roll" data-shares><span class="shares__line">1,284</span></span>
            </span>
          </footer>

          <!-- the selection bar that slides up under the article: it never covers the text -->
          <div class="bar" data-bar role="toolbar" aria-label="Selection">
            <span class="bar__info"><span class="bar__count" data-count>13 words</span><span class="bar__sub">selected</span></span>
            <button class="bar__btn" type="button" data-mark-btn aria-label="Highlight">
              <svg viewBox="0 0 20 20" aria-hidden="true"><path d="m12.6 3.6 3.8 3.8-7.2 7.2-4.6.8.8-4.6Z" /><path d="M3.4 17.2h6" /></svg>
            </button>
            <span class="bar__sep" aria-hidden="true"></span>
            <button class="bar__btn bar__btn--main" type="button" data-share-btn>
              <svg viewBox="0 0 20 20" aria-hidden="true"><path d="M7.4 5.6C5 6.4 3.8 8.4 3.8 11v4h4.6v-4.6H5.8M14.6 5.6c-2.4.8-3.6 2.8-3.6 5.4v4h4.6v-4.6H13" /></svg>
              <span>Share quote</span>
            </button>
          </div>
        </div>

        <!-- the share face -->
        <div class="face face--share" data-share aria-hidden="true">
          <div class="top" data-in>
            <button class="back" type="button" data-back aria-label="Back to the article">
              <svg viewBox="0 0 20 20" aria-hidden="true"><path d="M12 4.5 6.5 10l5.5 5.5" /></svg>
            </button>
            <span class="top__title">Share quote</span>
            <span class="top__size">Image · 4:5</span>
          </div>

          <figure class="qcard is-paper" data-qcard>
            <span class="qcard__mat qcard__mat--paper" data-mat="paper"></span>
            <span class="qcard__mat qcard__mat--tide" data-mat="tide"></span>
            <span class="qcard__mat qcard__mat--ember" data-mat="ember"></span>
            <svg class="qcard__grain" aria-hidden="true"><filter id="grain-q"><feTurbulence type="fractalNoise" baseFrequency="0.9" numOctaves="2" stitchTiles="stitch" /><feColorMatrix values="0 0 0 0 0.5  0 0 0 0 0.5  0 0 0 0 0.5  0 0 0 0.9 0" /></filter><rect width="100%" height="100%" filter="url(#grain-q)" /></svg>
            <span class="qcard__glow" aria-hidden="true"></span>
            <span class="qcard__sweep" data-sweep aria-hidden="true"></span>
            <span class="qcard__flash" data-flash aria-hidden="true"></span>
            <div class="qcard__in" data-qin>
              <svg class="qcard__glyph" viewBox="0 0 32 24" aria-hidden="true"><path d="M2 22V13C2 6.6 5.4 2.6 11.6 1.4l1 2.6C8.8 5.2 7.2 7.6 7 11h5.4v11Zm17.4 0V13c0-6.4 3.4-10.4 9.6-11.6l1 2.6c-3.8 1.2-5.4 3.6-5.6 7h5.4v11Z" /></svg>
              <blockquote class="qcard__text" data-qtext>The coast does not change when you stop to look at it; you do.</blockquote>
              <figcaption class="qcard__by">
                <span class="qcard__who"><b data-qauthor>Maren Holt</b><span data-qbrand>Low Tide Review</span></span>
                <svg class="qcard__mark" viewBox="0 0 24 24" aria-hidden="true"><path d="M4 9.5c2.7-2 5.3-2 8 0s5.3 2 8 0M4 14.5c2.7-2 5.3-2 8 0s5.3 2 8 0" /></svg>
              </figcaption>
            </div>
          </figure>

          <div class="pick" data-in>
            <span class="pick__label">Background</span>
            <span class="pick__name" data-matname><span class="pick__line">Paper</span></span>
            <span class="pick__chips" role="radiogroup" aria-label="Background">
              <button class="chip chip--paper is-on" type="button" role="radio" aria-checked="true" data-chip="paper" aria-label="Paper"></button>
              <button class="chip chip--tide" type="button" role="radio" aria-checked="false" data-chip="tide" aria-label="Tide"></button>
              <button class="chip chip--ember" type="button" role="radio" aria-checked="false" data-chip="ember" aria-label="Ember"></button>
            </span>
          </div>

          <div class="acts" data-in>
            <button class="copy" type="button" data-copy>
              <span class="copy__face">
                <svg class="copy__icon" viewBox="0 0 20 20" aria-hidden="true">
                  <rect class="copy__sheet" x="6.5" y="6.5" width="10" height="10" rx="2.4" />
                  <path class="copy__sheet" d="M13.5 6.5V5.4A2 2 0 0 0 11.5 3.4H5.4a2 2 0 0 0-2 2v6.1a2 2 0 0 0 2 2h1.1" />
                  <path class="copy__tick" data-tick d="M5.6 10.4 8.6 13.4 14.6 7" />
                </svg>
                <span class="copy__roll" data-copylabel><span class="copy__line">Copy image</span></span>
              </span>
            </button>
            <button class="save" type="button" data-save aria-label="Download image">
              <svg viewBox="0 0 20 20" aria-hidden="true"><path d="M10 3.4v9M6.4 9 10 12.6 13.6 9M4 15.8h12" /></svg>
            </button>
          </div>
        </div>
      </div>
    </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>

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.

39 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 “Shareable quote card” 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 white ground there is only the reading card: at the top the magazine’s wave mark, Low Tide Review, and Essay · 6 min read; below, the title in Fraunces and a paragraph, then the author row with the avatar and the share count. Tap the middle sentence: the sea-green highlighter runs along it line by line like a marker, the sentence darkens, and at the bottom of the card the dark selection bar springs up, with the word count, the highlighter and Share quote. Press Share quote and the article fades while the quote card grows from the exact box of the sentence into the full image, with a small overshoot; inside appear the quote marks, the sentence in italics, the author and the magazine, and below the background choice and the buttons come in staggered. Each background, paper, tide or ember, fades into the next while a blade of light crosses the card and the name rolls; the light also follows the pointer. Copy image squeezes the card, fires the white shutter flash, and the button says Copied to clipboard with a tick drawing itself. With the back arrow the card folds back into the sentence, the article returns and the counter goes up by one, turning green for a moment. Left alone, a drawn pointer does the whole round.

How it works

The highlighter line by line

The sentence is an inline mark with a single gradient as background, as wide as the --p variable. Without box-decoration-break: clone the background of an inline element on several lines is one strip broken across them, so tweening --p from 0% to 100% with GSAP makes the marker finish one line before starting the next.

The card born from the sentence

The boxes of the sentence and the quote card are read relative to the reading card; the quote card starts moved and scaled (different scaleX and scaleY, origin top left) exactly over the sentence and returns to scale 1 with a back.out. Its content stays hidden while the shape is stretched and appears only near the end. Closing runs the reverse path, with the boxes read again at that moment.

The backgrounds and the blade of light

Three stacked material layers (paper, tide, ember) with radial gradients and a grain made with feTurbulence in overlay blending; only their opacity changes. At every change a light band in soft-light travels from -120% to 300% and the background name rolls in a small window with hidden overflow.

The flash and the tick

Copy image squeezes the card to 0.965, turns on a white layer for 70 milliseconds that then fades, and puts the card back with an elastic; the tick is a path whose dash is as long as itself, brought to zero.

The rolling labels

Counter, background name and button label share one function: a new line comes in from below with a back.out while the old one leaves upwards and is removed, all in the same grid cell.

Values to change

NameFileDefaultWhat it changes
SPRINGscript.js1How lively the springs are (0 none, 1.6 a lot).
LIFT_TIMEscript.js0.8How many seconds the sentence takes to grow into the quote card.
SWEEPscript.js1How bright the light crossing the card is at every change (0 none).
SHARESscript.js1284How many times the article has already been shared.
AUTHORscript.js"Maren Holt"The name of the author.
BRANDscript.js"Low Tide Review"The name of the magazine.
LOOPscript.jstrueWhether, left alone, the drawn pointer repeats the round forever.

Try them in the Playground

When to use it

In the article of a personal blog, an online magazine or a newsletter, on the sentences worth pulling out: readers take away a quote already laid out, with the author and the masthead, ready for stories or a message.

On phones

The card narrows to 92 vw and the vertical sizes (title, text, quote card, gaps) use clamp with vh, so it fits the phone box; the selection bar sits below the text and never covers a word, and a tap does everything a click does.

With reduced motion

No movement: the highlighter appears already full, the bar, the quote card and the article cross-fade, no blade of light and no elastics, the tick appears already drawn. The drawn pointer is not shown, the demo still repeats.

Pitfalls

  • The selection bar first floated above the sentence like the phone one, but it covered the words of the line above: it became a bar at the bottom of the card, in the space the taller quote face leaves free.
  • The line-by-line marker only works without box-decoration-break: clone; with clone each line has its own background and they would all fill together.
  • The quote card must be measured without GSAP’s transform (clearProps before reading its box), otherwise on the second round it starts from the wrong size.
  • The two faces share the same grid cell, so the reading card is as tall as the taller one and does not jump when the face changes.

Libraries

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

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

Testing

Tested on 15 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