Skip to content
animorio
IT
Back to the library

Home insurance quote

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

The quote of a home insurance, on a dark card with a violet light: at the top an arc cut in four pieces, one per cover, with the monthly price inside. Switching a cover on, its piece of arc draws itself and lights up, the switch snaps, the price counts to the new figure and a word says how protected the home is; with all four the whole arc makes a wave of light.

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>
<!--
  "Home insurance quote" 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>Home insurance quote with the covers that light the arc and the premium that recalculates</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 quote of a home insurance: each cover switched on lights its piece of the arc, the monthly premium
         counts to the new price and a word says how protected the home is; with all of them the arc glows -->
    <section class="quote" data-quote aria-label="Home insurance quote">
      <header class="quote__head"><span>Nido Home</span><span class="quote__level roll"><span data-level>Solid cover</span></span></header>

      <div class="dial">
        <svg viewBox="0 0 240 128" aria-hidden="true">
          <g data-track></g>
          <g class="dial__lit" data-lit></g>
        </svg>
        <p class="dial__price"><strong><span data-cur>€</span><span data-price>13.00</span></strong><small>per month</small></p>
      </div>

      <div class="covers" data-covers></div>
    </section>
    <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.

18 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 “Home insurance quote” 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 nearly black background with a violet light from above, a dark card whose edge catches the light: at the top the insurer’s name and a tag saying the level (“Solid cover”). Below, a half-circle arc split into four pieces: those of the active covers are violet and glowing, the others barely hinted; inside the arc the monthly price, large. Then four rows, one per cover, with the icon, the name, how much it adds and the switch; the first is included and cannot be switched off. Touching a row the switch snaps with its knob stretching and returning, the piece of arc draws itself from left to right, the price counts to the new figure and the tag rolls to the new level. With all four on, the arc’s pieces swell one after the other like a wave and the card takes more light. Switching off, the piece empties the other way.

How it works

The arc in pieces

The script divides 180 degrees by the number of covers, removes a small gap between one piece and the next and writes for each an SVG arc (the A command) twice: a dim track and a lit piece with pathLength 1, which draws itself by taking stroke-dashoffset from 1 to 0.

The switch

Each row is a button with role switch and aria-checked. The knob goes right in 0.14 seconds while stretching (scaleX 1.35 with its origin on the arrival side) and turns round again on an elastic spring.

The price and the level

The premium is the sum of the covers switched on: a number that goes to the new figure with power2.out, written with two decimals. The level is a word taken from a list by how many covers are on; with all of them, the arc’s pieces go from 11 to 15 in thickness and back, staggered by 0.07 seconds.

Values to change

NameFileDefaultWhat it changes
BASEscript.js9The monthly price of the base cover, always included.
THEFTscript.js4How much theft adds.
WATERscript.js3How much water damage adds.
LIABILITYscript.js2.5How much liability adds.
CURRENCYscript.js€The currency symbol.
ACCENTscript.js#9a86ffThe colour of the arc and of the switches.
PAUSEscript.js1.5On its own: how many seconds between one tap and the next.
LOOPscript.jstrueLeft alone, a pointer switches the covers on and off.

Try them in the Playground

When to use it

For the landing page of an insurance (home, travel, car, pets) or of a service with add-on options: the visitor sees at once what changes in the price and how complete the choice is. It also suits a product’s plans with extras, a warranty, a modular subscription.

On phones

The same card, as wide as the screen minus the margins, with the arc and the rows measured on the height too; the covers switch on with a tap.

With reduced motion

No drawing arc, stretching knob or wave: pieces, switches, price and level are at their state at once.

Pitfalls

  • An unlit piece of arc must be hidden with opacity: a round-capped stroke of zero length leaves a dot at the start of the piece.
  • The price counts with power2.out, not a spring: a premium that passes the figure and comes back, even by a few cents, looks like a mistake.
  • The included cover is a disabled button with the word “Included” in place of the switch: it stays in the list but does not look switchable.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.

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