Skip to content
animorio
IT
All components

Visit live site button

Buttons, Hover, SVGGSAP, CSS onlyMediumCompressed weight: Demo 5.0 KBGSAP 28 KBFreeDownload the zip

The button under a portfolio project that opens the real site: a dark pill with a small browser window, the address and an arrow. Pressed, the page in the small window writes itself line by line while an acid green line runs along the bottom of the pill; then the arrow takes off towards the corner, comes back from the opposite one and the label says the site is open in a new tab.

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>
<!--
  "Visit live site 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>Visit live site button with the window that loads and the arrow that takes off</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 button under a portfolio project that opens the real site: pressed, the little window draws its page
         line by line while a thin line runs along the bottom of the pill; then the arrow takes off, comes back
         from the opposite corner and the label says the site is open in a new tab -->
    <button class="vis" type="button" data-vis>
      <span class="vis__body" aria-hidden="true"><span class="vis__bar" data-bar></span><span class="vis__light"></span></span>
      <span class="vis__edge" aria-hidden="true"></span>

      <span class="seat" data-seat aria-hidden="true">
        <svg viewBox="0 0 24 24">
          <rect x="3" y="4.5" width="18" height="15" rx="3.2"></rect>
          <path d="M3 9h18"></path>
          <path class="seat__mark" d="M6 6.8h2.600"></path>
          <path class="seat__line" data-line pathLength="1" d="M6.4 12.3h7.400"></path>
          <path class="seat__line" data-line pathLength="1" d="M6.4 14.900h11.200"></path>
          <path class="seat__line" data-line pathLength="1" d="M6.4 17.300h5.200"></path>
        </svg>
      </span>

      <span class="label">
        <span class="label__main"><span data-word>Visit live site</span></span>
        <span class="label__sub"><span data-sub>northfold.studio</span></span>
      </span>
      <span class="tag" data-tag aria-hidden="true"><svg viewBox="0 0 24 24"><g data-arrow><path d="M7.600 16.400 16.400 7.600M9.400 7.600h7v7"></path></g></svg></span>
    </button>
    <p class="sr" data-live aria-live="polite"></p>

    <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.

12 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 “Visit live site 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

In the centre, on white, a nearly black pill 60 pixels tall whose edge catches the light: on the left, in a round seat, a small browser window drawn in outline with three page lines, then “Visit live site” with the address below, and on the right a circle with an arrow pointing up and right. Under the pointer the arrow leans out by two pixels. Pressed, the label rolls to “Opening”, the three page lines are erased and written again one after the other in acid green, and a thin glowing line runs along the bottom of the pill: it starts fast, waits in the middle, then finishes. At the end the arrow takes off towards the top corner and comes back from the bottom one with a bounce, the circle turns acid green and the label says “Opened in a new tab”. After a couple of seconds it goes back.

How it works

The page that writes itself

The three lines in the small window are SVG paths with pathLength 1: on press their stroke-dashoffset goes to 1 (they are erased) and back to 0 with a stagger equal to a fifth of the loading time, so the page fills from the top.

The loading line

A layer 2.5 pixels tall at the bottom of the pill, clipped by its round edge, goes from scaleX 0 to 1 with the slow(0.35, 0.7) ease: fast, almost still in the middle, fast again, like a real tab loading.

The arrow

The arrow leaves by 15 pixels up and right in 0.2 seconds and comes back from the opposite corner with back.out; the circle has hidden overflow, so it seems to leave through a window and come back from the other side.

Values to change

NameFileDefaultWhat it changes
SITEscript.jsnorthfold.studioThe address written below (invented).
LOADscript.js1.3How many seconds the loading takes.
ACCENTscript.js#c9ff45The colour of the line, of the page and of the arrived arrow.
HOLDscript.js2.4On its own: how many seconds it stays on “Opened in a new tab” before going back.
LOOPscript.jstrueLeft alone, a pointer tries it by itself.

Try them in the Playground

When to use it

For a project page in a portfolio or a case study: the button that leads to the real site. It suits any link that leaves the site: a product demo, the documentation, the shop. In a real product a link with target _blank takes the place of the button, and the animation lasts just long enough to accompany the opening.

On phones

The same button: the pill takes at most the screen width minus the margins; it is pressed with a finger and there is no light under the pointer.

With reduced motion

No lines writing themselves, running line or arrow taking off: the loading line appears whole with a fade, then circle and label change in place.

Pitfalls

  • The loading line sits inside the pill, clipped by its edge: it is not the progress bar at the top of the page.
  • The arrow’s circle has hidden overflow: without it, the leaving arrow would be seen flying out of the button.
  • The arrow leaning out under the pointer does not move while loading: two tweens on the same element would step on each other at take-off.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.

Compressed with gzip, the three demo files weigh 5.0 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