Skip to content
animorio
IT
Back to the library

Domain DNS check

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

Connecting a custom domain in a hosting service’s panel. Three DNS records to copy (A, CNAME, TXT); “Verify records” checks them one at a time, a spinner turning and a tick drawing itself. The TXT has not propagated yet and waits with a clock; on the second check it arrives, the padlock closes and the domain is “Connected”.

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>
<!--
  "Domain DNS check" 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>Domain DNS check</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">
    <!-- connecting a custom domain in a hosting panel: three DNS records to copy, checked one row at a time;
         one has not propagated yet, a second check finds it, the padlock closes and the domain is connected -->
    <section class="dv" data-dv aria-label="Connect a custom domain">
      <header class="dv__head">
        <span class="dv__domain">shop.example.com</span>
        <span class="dv__chip" data-chip><span class="dv__roll"><span data-status aria-live="polite">Not connected</span></span></span>
      </header>

      <ul class="dv__rows" data-rows></ul>

      <div class="dv__note">
        <svg class="dv__lock" data-lock viewBox="0 0 20 20" aria-hidden="true">
          <path class="dv__shackle" data-shackle d="M6.500 9V6.500a3.500 3.500 0 0 1 7 0V9"></path>
          <rect class="dv__body" x="4.500" y="9" width="11" height="8" rx="2.200"></rect>
        </svg>
        <span class="dv__roll dv__notetext"><span data-note>Add these records where you bought the domain</span></span>
      </div>

      <button class="dv__go" type="button" data-go><span class="dv__roll"><span data-golabel>Verify records</span></span></button>
    </section>

    <svg class="ghost" data-ghost viewBox="0 0 24 24" aria-hidden="true"><path d="M5 3.200 19.200 11l-6.300 1.600-3.300 5.900Z"></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.

14 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 “Domain DNS check” 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 light ground, a white card: at the top the domain, shop.example.com, and the “Not connected” chip. Below, three rows in a panel: the record type, the name, the value in monospace and a button to copy it. Then a help line and the dark “Verify records” button. Copy a value and the button bounces, the value blinks and the help line confirms. Press Verify and the chip becomes “Checking” while the rows are checked one after the other: in place of the copy button a spinner turns, then a green tick draws itself with a veil of light across the row. On the TXT a amber clock draws instead: “2 of 3 found”, and below it the note that it can take a few minutes. “Check again” rechecks only what is missing; once that is found too, the chip rolls to “Connected” and turns green, an open padlock appears beside the help line and its shackle drops shut. The button, now pale, says “Disconnect” and takes everything back to the start.

How it works

Four things in one place

At the end of each row the copy button, the spinner, the tick and the clock sit on top of one another: the row’s state decides which shows, and the hidden button leaves the Tab order.

One record at a time

The check queues the rows not yet found, each with its own wait: spinner first, then the result. On the second pass the queue is shorter, because found rows are not checked again.

The spinner turns on its centre

What turns is the whole svg element, with transformOrigin at 50%: svgOrigin only works for what is inside an svg, and here it would move the pivot.

The padlock

Body and shackle are two paths: the shackle starts three pixels up and drops with a small bounce, then the whole padlock gives a little kick of scale.

Values to change

NameFileDefaultWhat it changes
ACCENTscript.js#1e9e62The colour of found records, the padlock and Connected.
CHECKscript.js0.75How many seconds each record’s check takes.
SLOWscript.js2Which record has not propagated on the first check: 0, 1 or 2; -1 = all found at once.
LOOPscript.jstrueLeft alone, the demo’s pointer copies a value, verifies twice and then disconnects.

Try them in the Playground

When to use it

In the domain settings of a hosting service, a site builder, an online shop or a mail service; on the page presenting one of these products, to show how simple connecting your own domain is.

On phones

The same card, as wide as the screen: type and name have a fixed width, the value takes the rest and truncates with an ellipsis; the copy buttons are 32 pixels.

With reduced motion

No spinner and no drawing: on Verify the results appear at once, ticks and clock already drawn; the padlock appears closed. The demo does not move by itself.

Pitfalls

  • No DNS is queried here: names and addresses are the ones reserved for examples (example.com, 203.0.113.10) and the outcome is decided by the script. The real check is done by the server.
  • Copying to the clipboard works only on a secure page and after a user gesture: if the browser refuses, the value is still selectable.
  • A record already found should not be rechecked on the second pass: seeing it spin again suggests it was lost.
  • The spinner is a whole svg that rotates: on an svg, svgOrigin moves the pivot and makes it orbit, it needs transformOrigin 50% 50%.
  • While checking, the button is disabled: two quick clicks would start two passes at once.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.

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

Testing

Tested on 21 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 animations