Skip to content
animorio
IT
Back to the library

Dental chart

SVG, HoverGSAP, CSS onlyMediumCompressed weight: Demo 6.4 KBGSAP 28 KBFreeDownload the zip

The treatment plan of a dentist’s practice: the upper arch drawn tooth by tooth, with the three teeth to treat tinted teal. Hovering a tooth, or a line of the plan, the tooth lifts out of the arch, its neighbours make room, and the empty middle says what is to be done and what it costs.

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>
<!--
  "Dental chart" 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>Dental chart of a dentist's practice with the treatments that light up on hover</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 treatment plan of a dentist's practice: the upper arch drawn tooth by tooth; the teeth to treat are
         tinted, and a tooth or a line of the plan lifts its tooth and says what will be done -->
    <section class="plan" data-plan aria-label="Treatment plan">
      <header class="plan__head">
        <span class="plan__brand">Molare Studio</span>
        <span class="plan__who">Upper arch</span>
      </header>

      <div class="arch" data-arch>
        <svg viewBox="26 6 268 184" data-svg aria-hidden="true"></svg>
        <div class="arch__say" aria-live="polite">
          <span class="arch__kind"><span data-kind></span></span>
          <span class="arch__name"><span data-name></span></span>
        </div>
      </div>

      <div class="rows" data-rows>
        <span class="rows__thumb" data-thumb aria-hidden="true"></span>
      </div>
    </section>

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

14 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 “Dental chart” 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 warm white, a white card: at the top the practice’s name, then the sixteen teeth of the upper arch laid out as a horseshoe (wide molars with crossed grooves, premolars with one groove, smooth incisors), three of them tinted teal. On opening the teeth arrive from the middle outwards. In the middle of the arch there is a text: at rest it says “3 treatments, Your plan for this arch”. Hovering a tooth, it lifts outwards and grows on a spring, its two neighbours move aside a little, and the text rolls to the tooth’s name and “Healthy”, or to the treatment and its price; if it is a tooth to treat a halo opens once and its line in the plan lights up with a tile that slides. It also works the other way: a line of the plan lights its tooth.

How it works

The measured arch

Half an ellipse sampled in 600 steps with a table of lengths: each tooth sits at the middle of its stretch, as wide as itself plus 2.6 units of gap, and rotates on the ellipse’s normal. So molars and incisors, of different widths, all touch the same way.

Two groups per tooth

The outer group has position and rotation written in the transform attribute; the inner one belongs to GSAP. The inner group’s negative y already means “out of the arch” for every tooth, with no sines or cosines in the animation.

The chosen tooth

It rises by LIFT and grows to GROW with back.out(2.6), the neighbours shift by NUDGE along the arch with power3.out, the halo goes from 0.9 to 1.45 and fades. The tile of the lines uses the line’s offsetTop.

Values to change

NameFileDefaultWhat it changes
ACCENTscript.js#0fa596The colour of the teeth to treat.
LIFTscript.js5By how many units the chosen tooth lifts, out of the arch.
NUDGEscript.js1.8How far the two neighbouring teeth move aside.
GROWscript.js1.14How much the chosen tooth grows.
PAUSEscript.js1.5Alone: how many seconds it stays on each tooth.
LOOPscript.jstrueLeft alone, a pointer visits the teeth of the plan.

Try them in the Playground

When to use it

On the site or in the patient area of a dentist’s practice, in a quote to send to the patient, in a practice management tool for dentists. The treatments sit in a list at the top of the script: tooth, name and price.

On phones

The same card, as wide as the screen; the arch never exceeds 46% of the height and the lines drop to 34 pixels in short windows. A tap on a tooth or a line does the hover’s job.

With reduced motion

The teeth do not lift, grow or arrive one by one: the chosen tooth changes colour and outline, the text in the middle changes without rolling and the tile appears on the line.

Pitfalls

  • GSAP on the group that already has translate and rotate in its attribute overwrites them: that is why each tooth has two groups, one for its place and one for the motion.
  • The text in the middle sits in a div above the SVG with pointer-events: none, otherwise it would cover the front teeth.
  • Only the teeth of the plan and the lines can be reached with Tab: sixteen stops for one arch would be too many.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.

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

Testing

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