Skip to content
animorio
IT
All components

Dealership contact card

Cards, Hover, TransitionsGSAP, CSS onlyMediumCompressed weight: Demo 8.4 KBGSAP 28 KBFreeDownload the zip

The contact card of a made-up car dealership, Hartwell Motors, graphite on black like a Dribbble shot. At the top, today's hours on a thin bar of the day, 8 to 7, with a tick for now arriving on a spring and the minutes left counting down with the clock; «Open now» turns into «Closing soon» in the last hour. Below, three channels (call, write, book a test drive) are quiet rows that open on hover and show their detail: the number to copy with a check that draws itself, a chat to start, three slots to pick. At the bottom, the sales advisor with her initials.

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>
<!--
  "Dealership contact card" 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>The dealership contact card with the channels that open 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 contact card of Hartwell Motors, an invented car dealership: today's hours on a thin bar of the day with a
         tick for now, three channels (call, write, book a test drive) that open their detail on hover, a number that
         copies with a check drawn by hand, and the sales advisor with her initials -->
    <section class="card" data-card aria-labelledby="card-title">
      <span class="card__light" data-light aria-hidden="true"></span>

      <header class="card__head" data-rise>
        <span class="card__mark" aria-hidden="true">
          <svg viewBox="0 0 24 24"><path d="M5 17V7M19 17V7M5 12h14"/><path class="card__mark-arc" d="M3.5 19.5c5-2.2 12-2.2 17 0"/></svg>
        </span>
        <span class="card__names">
          <span class="card__brand" id="card-title">Hartwell Motors</span>
          <span class="card__place">Showroom · Northgate</span>
        </span>
      </header>

      <div class="hours" data-rise>
        <div class="hours__line">
          <span class="hours__state" data-state>Open now</span>
          <span class="hours__sep" aria-hidden="true"></span>
          <span class="hours__close" data-close>closes 19:00</span>
          <span class="hours__left" data-left>2 h 20 min left</span>
        </div>
        <div class="hours__bar" aria-hidden="true">
          <span class="hours__open" data-open></span>
          <span class="hours__tick" data-tick><span class="hours__tick-line"></span></span>
        </div>
        <div class="hours__ends" aria-hidden="true"><span>08:00</span><span>19:00</span></div>
      </div>

      <ul class="ways" data-ways>
        <li class="way" data-way="call" data-rise>
          <button class="way__row" type="button" aria-expanded="false" data-row>
            <span class="way__icon" aria-hidden="true">
              <svg viewBox="0 0 24 24"><path d="M7.6 3.8 9.9 7a1.5 1.5 0 0 1-.2 1.9l-1.2 1.2a10.6 10.6 0 0 0 5.4 5.4l1.2-1.2a1.5 1.5 0 0 1 1.9-.2l3.2 2.3a1.5 1.5 0 0 1 .3 2.1l-1 1.3a3 3 0 0 1-3 1.1C10.6 19.7 4.3 13.4 3.1 7.5a3 3 0 0 1 1.1-3l1.3-1a1.5 1.5 0 0 1 2.1.3z"/></svg>
            </span>
            <span class="way__text">
              <span class="way__title">Call sales</span>
              <span class="way__sub" data-sub>Answered in under a minute</span>
            </span>
            <span class="way__chev" aria-hidden="true"><svg viewBox="0 0 24 24"><path d="m9 6 6 6-6 6"/></svg></span>
          </button>
          <div class="way__more" data-more>
            <div class="way__inner">
              <span class="way__number" data-number>+44 20 7946 0318</span>
              <button class="copy" type="button" data-copy>
                <span class="copy__face" data-copyface>Copy</span>
                <span class="copy__done" data-copydone aria-hidden="true">
                  <svg viewBox="0 0 24 24"><path class="copy__tick" data-copytick d="m5 12.5 4.5 4.5L19 7.5"/></svg>
                  Copied
                </span>
              </button>
            </div>
          </div>
        </li>

        <li class="way" data-way="write" data-rise>
          <button class="way__row" type="button" aria-expanded="false" data-row>
            <span class="way__icon" aria-hidden="true">
              <svg viewBox="0 0 24 24"><path d="M4.5 5.5h15a1.5 1.5 0 0 1 1.5 1.5v8.5a1.5 1.5 0 0 1-1.5 1.5H10l-4.5 3.5V17H4.5A1.5 1.5 0 0 1 3 15.5V7a1.5 1.5 0 0 1 1.5-1.5z"/><path d="M7.5 10h9M7.5 13h5.5"/></svg>
            </span>
            <span class="way__text">
              <span class="way__title">Write to us</span>
              <span class="way__sub">Replies in about 10 min</span>
            </span>
            <span class="way__chev" aria-hidden="true"><svg viewBox="0 0 24 24"><path d="m9 6 6 6-6 6"/></svg></span>
          </button>
          <div class="way__more" data-more>
            <div class="way__inner way__inner--write">
              <span class="way__quote">“Is the grey estate still in stock?”</span>
              <span class="way__send">Start a chat</span>
            </div>
          </div>
        </li>

        <li class="way" data-way="drive" data-rise>
          <button class="way__row" type="button" aria-expanded="false" data-row>
            <span class="way__icon" aria-hidden="true">
              <svg viewBox="0 0 24 24"><circle cx="12" cy="12" r="8.5"/><circle cx="12" cy="12" r="2"/><path d="M12 14v6.5M10.2 11 4 9.4M13.8 11 20 9.4"/></svg>
            </span>
            <span class="way__text">
              <span class="way__title">Book a test drive</span>
              <span class="way__sub" data-drivesub>45 minutes, no strings</span>
            </span>
            <span class="way__chev" aria-hidden="true"><svg viewBox="0 0 24 24"><path d="m9 6 6 6-6 6"/></svg></span>
          </button>
          <div class="way__more" data-more>
            <div class="way__inner way__inner--slots" data-slots>
              <button class="slot" type="button" data-slot>Tue 10:00</button>
              <button class="slot" type="button" data-slot>Tue 14:30</button>
              <button class="slot" type="button" data-slot>Wed 11:00</button>
            </div>
          </div>
        </li>
      </ul>

      <footer class="advisor" data-rise>
        <span class="advisor__face" aria-hidden="true">MR</span>
        <span class="advisor__text">
          <span class="advisor__name">Maya Rowe</span>
          <span class="advisor__role">Your sales advisor</span>
        </span>
        <span class="advisor__langs">EN · IT</span>
      </footer>
    </section>

    <svg class="pointer" viewBox="0 0 24 24" aria-hidden="true" data-pointer><path d="M5 3.5 18.5 12 12.4 13.6 9.4 19.6z"/></svg>
    <p class="sr" aria-live="polite" data-live></p>
  </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.

43 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 “Dealership contact card” 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

A contact card that says everything with little: whether the showroom is open now and for how long, and the three ways to reach it. The channels stay closed and open one at a time on hover (or on tap on a phone), so the card stays short and tidy; the number copies with one tap and the confirmation draws itself in the button.

How it works

The bar of the day

The bar runs from opening to closing (OPENS, CLOSES); the part of the day already gone fills with a champagne gradient and the tick for now arrives from the left on a spring (BOUNCE). Then every frame reads the hour again, NOW plus the real time gone by, and updates the minutes left; under SOON minutes the state rolls from «Open now» to «Closing soon», after closing to «Closed».

The channels that open

Each channel is a row with an icon, a title and a small line; the detail sits in a box of zero height. On hover its height goes to the size of the content in OPEN_TIME seconds, the chevron turns 90 degrees with a small overshoot, the row lightens by a veil and the detail rises staggered from 7 pixels and a blur. One opens at a time; leaving the list they close after a moment.

Copy and the check

Copy squashes and comes back on an elastic spring, the label leaves upwards and «Copied» rises from below with a check drawn by its stroke (strokeDashoffset); the number lights up champagne and cools down. After COPY_HOLD seconds the button is back as it was.

The test drive

Three slots as pills: the chosen one fills with champagne with a small bounce and the channel's small line rolls to «Booked · Tue 14:30»; tapping it again clears it.

The pilot

While nobody moves the mouse, a drawn pointer opens the call, copies the number, passes over the chat, books the test drive and leaves, then starts again. At the first real movement it hides and comes back after nine still seconds.

Values to change

NameFileDefaultWhat it changes
NOWscript.js16.67The hour of the day the card starts at (16.67 is 16:40).
OPENSscript.js8The hour the showroom opens.
CLOSESscript.js19The hour it closes.
SOONscript.js60Minutes before closing when «Open now» turns into «Closing soon».
OPEN_TIMEscript.js0.5Seconds a channel takes to open its detail.
BOUNCEscript.js1.4The overshoot of the chevron and of the tick for now (0 none).
COPY_HOLDscript.js1.8Seconds «Copied» stays before the button comes back.
SPEEDscript.js12 = the pilot twice as fast, 0.5 = half.
LOOPscript.jstrueThe pilot plays the story again and again.

Try them in the Playground

When to use it

On the contact page or at the bottom of the landing page of a car dealership, a motorbike or bicycle showroom, an estate agency, a practice or a shop with opening hours: whoever arrives sees at once whether they can call now and how, without a long form.

On phones

The same animation with adapted sizes: the card is 92% of the screen wide and the gaps are measured on the height too; in short boxes the place, the hours at the ends of the bar and the advisor's role give their room to the channels. Without hover the channels open on tap.

With reduced motion

Nothing moves: the tick for now is already in place, the channels open at once and the detail fades in, «Copied» and the check appear already drawn, the test drive line changes with a fade; the pilot does not move.

Pitfalls

  • The detail box measures zero: the height to reach is read from its first child (offsetHeight), which keeps its real size even when the parent is closed; on resize the open one is measured again.
  • GSAP and a hand-written transform string on the same pointer cancel each other: the pointer position goes through gsap.set too, so the press (scale) does not throw it into a corner.
  • The pilot must not close the channels through real mouse events: the listeners check isTrusted, and leaving the list closes after 0.35 seconds so passing from one row to the next does not flicker.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.

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

Testing

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