Skip to content
animorio
IT
All components

Pinned notes card

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

The card of a made-up notes app, Sorrel: three pinned notes on top that you reorder by dragging, the one you hold lifting and leaning with its speed while the others make room on a spring; recent notes below. Tap a note and it opens for reading, growing from its own row until it fills the card, with title, date, tag and a checklist whose ticks draw themselves; Back folds it into its row 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>
<!--
  "Pinned notes 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 notes card with the pinned notes to reorder and open for reading</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>
    <!-- the notes card of Sorrel, an invented notes app: three pinned notes on top that you reorder by dragging (the
         others make room on a spring), recent notes below, and any note that opens for reading from its own row -->
    <section class="notes" data-notes aria-labelledby="notes-title">
      <header class="notes__head">
        <span class="notes__app" aria-hidden="true">
          <svg viewBox="0 0 20 20"><path d="M5 3.5h7.2L15.5 6.8V16a.5.5 0 0 1-.5.5H5a.5.5 0 0 1-.5-.5V4a.5.5 0 0 1 .5-.5z"/><path d="M12 3.6V7h3.4"/><path class="notes__app-line" d="M7.2 10.2h5.6M7.2 12.9h3.8"/></svg>
        </span>
        <span class="notes__meta">
          <span class="notes__brand" id="notes-title">Sorrel</span>
          <span class="notes__sub"><span data-total>12</span> notes · synced</span>
        </span>
        <button class="notes__new" type="button" aria-label="New note">
          <svg viewBox="0 0 20 20" aria-hidden="true"><path d="M10 5v10M5 10h10"/></svg>
        </button>
      </header>

      <div class="notes__label">
        <svg class="notes__pin" viewBox="0 0 16 16" aria-hidden="true"><path d="M6 2.5h4l-.6 4 2.3 2.2H4.3L6.6 6.5z"/><path d="M8 8.7v4.8"/></svg>
        <span>Pinned</span>
        <span class="notes__hint" data-hint>Drag to reorder</span>
      </div>
      <ol class="notes__pinned" data-pinned aria-label="Pinned notes"></ol>

      <div class="notes__label notes__label--recent"><span>Recent</span></div>
      <ul class="notes__recent" data-recent aria-label="Recent notes"></ul>

      <article class="reader" data-reader aria-hidden="true" aria-labelledby="reader-title">
        <div class="reader__bar">
          <button class="reader__back" type="button" data-back aria-label="Back to notes">
            <svg viewBox="0 0 20 20" aria-hidden="true"><path d="M11.5 5.5 7 10l4.5 4.5"/></svg>
            <span>Notes</span>
          </button>
          <span class="reader__tag" data-r-tag>Work</span>
        </div>
        <h2 class="reader__title" id="reader-title" data-r-title></h2>
        <p class="reader__date" data-r-date></p>
        <div class="reader__body" data-r-body></div>
        <div class="reader__progress" aria-hidden="true">
          <div class="reader__plabel"><span>Checklist</span><span data-r-count></span></div>
          <div class="reader__track"><span class="reader__fill" data-r-fill></span></div>
        </div>
        <p class="reader__foot"><span data-r-words></span> words · edited on this laptop</p>
      </article>
    </section>
    <svg class="pointer" viewBox="0 0 24 24" aria-hidden="true" data-pointer><path d="M5 3.5 18.5 12 12.4 13.6 9.4 19.6z"/></svg>
    <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.

26 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 “Pinned notes 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

A warm white card with three pinned notes and two recent ones. The pinned ones sit in a stack: held by the grip (or the row) they drag up and down, lift with a deeper shadow and lean a little with their speed, while the others slide to their new place with a pixel of bounce; let go and the line on top says «Order saved». A note tapped without dragging opens: the row grows into the whole card, then the bar with Back and the tag, the title, the date and the list come in; ticks draw themselves when tapped. Back folds the note into its row again, which settles with a small bounce.

How it works

Pinned rows in absolute position

The three pinned notes are absolutely positioned rows, each at its own y (index times step, the step measured on the real row height and measured again on resize). So one row can slide freely over the others while they move to their new place.

Dragging

Pointer Events with setPointerCapture: the held row follows the finger with gsap.set, lifts (LIFT) and leans with its speed through a quickTo on rotation (TILT). When it passes half a slot, the order changes and the other rows go to their place with back.out (SPRING) in MAKE_ROOM seconds. Under 4 pixels it is a tap, not a drag, and the note opens.

The note growing out of its row

The reader is an absolutely positioned panel in the card: it starts at the size and position of the row (getBoundingClientRect) and grows to the card in OPEN_TIME with expo.inOut while the row fades; then its parts come in staggered. Closing runs the way back to the row, measured again at that moment.

Ticks that draw themselves

Each tick is a path with a stroke-dasharray as long as the mark: a tap brings stroke-dashoffset to zero and the box gives a small bounce; the struck line turns grey.

The pilot

A drawn pointer grabs the third note by its grip and takes it to the top, opens the recent meeting note, ticks an item, goes back and puts the note where it was. At the first real mouse move, tap or key, the pilot stops.

Values to change

NameFileDefaultWhat it changes
SPRINGscript.js1.7How far the other notes overshoot when they make room (0 none).
MAKE_ROOMscript.js0.42Seconds for the other notes to slide to their place.
LIFTscript.js1.035How much the held note grows.
TILTscript.js2Degrees the held note leans with its speed.
OPEN_TIMEscript.js0.6Seconds for the note to grow from its row into the reader.
HOLDscript.js1.6Seconds the pilot stays on the open note.
SPEEDscript.js1Pilot speed.
LOOPscript.jstrueThe pilot starts over.

Try them in the Playground

When to use it

On the home screen of a notes app, a journal, a task manager or in a dashboard side panel: the pinned things on top reordered with one gesture, and every note opening without leaving the page. It also works as an info card on a website, with notes or FAQs that open.

On phones

The same animation with adapted sizes: the card is 92% of the screen wide and the row height also follows the window height, so the card fits the phone box. The finger drags just like the mouse, without scrolling the page.

With reduced motion

Nothing moves by itself: the other notes jump to their place, the note opens and closes as a fade and ticks appear already drawn; the pilot's pointer is hidden.

Pitfalls

  • An entrance with gsap.from on the y of the pinned rows started them all from the same height: the rows come in with opacity and scale only, because their y is their place in the stack.
  • The reader grows from the row measured inside the card: measure it when opening and again when closing, because the order or the window may have changed in between.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.

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

Testing

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