Skip to content
animorio
IT
All components

Load more button

Buttons, Hover, TransitionsGSAP, CSS onlyMediumCompressed weight: Demo 7.3 KBGSAP 28 KBFreeDownload the zip

The Load more button at the end of a made-up ceramics shop’s grid: pressed, the pill tightens and a warm light runs inside it while the label rolls to Loading; below, six skeleton cards spring in, each fills when its piece arrives, the list glides up just enough to show them, the count rolls from 6 to 12 of 24 and the progress hairline grows. On the last page the pill folds into a hairline: You’ve seen it all. Premium style.

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>
<!--
  "Load more button" 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>Load more button</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 end of a product grid with its Load more button: the pill tightens, a light runs inside it while six
         skeleton cards spring in below, each one fills when its content arrives, the list glides up to show them,
         the count rolls and the progress hairline grows. On the last page the pill folds into a hairline. -->
    <section class="feed" data-wrap aria-label="Glazed pieces">
      <div class="view" data-view>
        <ul class="grid" data-grid role="list"></ul>
      </div>

      <div class="foot">
        <div class="count" aria-hidden="true">
          <span>Showing</span>
          <span class="num" data-num><span class="num__in" data-numin>6</span></span>
          <span>of <b data-total>24</b></span>
        </div>
        <div class="track" aria-hidden="true"><span class="track__fill" data-fill></span></div>

        <div class="action" data-action>
          <button class="pill" type="button" data-more data-autoclic aria-controls="feed-live">
            <span class="pill__bg" data-bg aria-hidden="true"></span>
            <span class="pill__light" aria-hidden="true"><span data-light></span></span>
            <span class="pill__label" data-label>
              <span class="roll" data-roll><span>Load more</span><span>Loading</span></span>
            </span>
            <svg class="pill__arrow" viewBox="0 0 16 16" aria-hidden="true" data-arrow><path d="M8 3.5v8.5M4.2 8.6 8 12.4l3.8-3.8"/></svg>
          </button>
          <div class="done" data-done aria-hidden="true">
            <span class="done__line" data-doneline></span>
            <span class="done__text" data-donetext>You&rsquo;ve seen it all</span>
            <span class="done__line done__line--r" data-donelineR></span>
          </div>
        </div>
      </div>
      <p class="sr" id="feed-live" aria-live="polite" data-live>Showing 6 of 24 pieces.</p>
    </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.

25 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 “Load more button” 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 end of a made-up ceramics shop’s grid: six cards with the glaze of a cup, a bowl or a jug (a soft colour block with its own light and a darker rim, and a raised round shape), the name and the price. Below, Showing 6 of 24, a thin clay hairline saying how far along you are, and the black Load more pill with its arrow. With the pointer over it the label widens on the width axis, the ground swells on an elastic and the arrow dips a breath. Pressed, the pill tightens and bounces, the label rolls to Loading, the arrow goes and a warm light passes again and again inside the pill. Below, six skeleton cards come in, one after another on a spring, with light grey blocks a light runs over; the list glides up inside its window just enough to show them. Then the pieces arrive: each skeleton fades and the card fills, the glaze settling with a small bounce; the old number leaves upward and the new one comes in from below (12), and the hairline grows. The pill goes back to Load more on an elastic. On the last page the label goes, the pill flattens into a hairline and narrows away, and in its place two thin lines grow from the middle around You’ve seen it all. From the keyboard focus moves to the first new card and the count is announced to screen readers.

How it works

The list window

The grid sits in a window two rows tall, with a mask fading top and bottom; on each Load more GSAP moves it up as far as needed, to min(0, window height − grid height). Columns, gaps and height are recomputed on resize.

The skeletons

Each new card is born with its content transparent and a skeleton on top: a block and two grey bars, with a gradient light running from −100% to 100% on repeat. They come in from 22 pixels below with back.out, 0.06 seconds apart.

The pieces arriving

After WAIT seconds, STAGGER apart, the skeleton fades and the content appears; the glaze goes from 0.96 to 1. Halfway the old number leaves upward in 0.22 seconds, changes, and the new one comes in from below, and the progress hairline goes to shown/total with scaleX.

The pill

The ground is a separate layer, so it squashes and bounces without making the label shake; the label is a stack of two lines in a one-line window; the light is a gradient passing from −120% to 260% on repeat while loading. On the last page the ground goes to scaleY 1/60 and then narrows, and the two lines grow from the middle.

Values to change

NameFileDefaultWhat it changes
TOTALscript.js24How many pieces the grid has in all
PAGEscript.js6How many pieces arrive on each Load more
WAITscript.js0.85Seconds of waiting before the first piece
STAGGERscript.js0.12Seconds between one piece and the next
GLIDEscript.js0.9Seconds of the glide to the new pieces
SPRINGscript.js1How much the cards and the pill bounce
WIDENscript.js112The label width on hover
IDLEscript.js1.2Seconds before the demo starts by itself

Try them in the Playground

When to use it

At the end of a product grid, an article list, a project archive or search results, where infinite scroll would take the footer away.

On phones

Same animations; the grid drops to two columns under 420 pixels and the window shortens with the screen. On touch there is no hover widening, the press is there.

With reduced motion

No glides or bounces: the cards fade in, the list jumps to the right place, the number changes in place and the pill fades away at the end.

Pitfalls

  • Focus on the first new card needs preventScroll, otherwise the browser scrolls the list window by itself and GSAP’s glide jumps.
  • The swelling ground is a separate layer: scaling the whole button made the label shake.
  • The scroll target is measured after the cards are added, and recomputed on resize.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.

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

Testing

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