AI CSS Animations

Voice Agent Call Card

A dark call card for a voice agent: a glassy orb swirls with two tones and throws soft rings while it speaks, next to the agent name, a live timer, mute and an End call button.

Also known as: voice agent ui, elevenlabs orb css, ai phone call animation, voice agent animation.

Billing agent Speaking · 02:14

HTML

<div class="aia-voice-call-orb" role="status" aria-label="Billing agent is speaking">
  <div class="aia-voice-call-orb-orb">
    <span class="aia-voice-call-orb-swirl"></span>
    <span class="aia-voice-call-orb-swirl aia-voice-call-orb-swirl-back"></span>
  </div>
  <div class="aia-voice-call-orb-body">
    <b class="aia-voice-call-orb-name">Billing agent</b>
    <span class="aia-voice-call-orb-meta"><span class="aia-voice-call-orb-eq"><i></i><i></i><i></i></span>Speaking · 02:14</span>
    <div class="aia-voice-call-orb-actions">
      <button class="aia-voice-call-orb-mute" type="button" aria-label="Mute">
        <svg viewBox="0 0 24 24" aria-hidden="true"><rect x="9" y="3" width="6" height="11" rx="3"/><path d="M5.5 11a6.5 6.5 0 0 0 13 0M12 17.5V21"/></svg>
      </button>
      <button class="aia-voice-call-orb-end" type="button">End call</button>
    </div>
  </div>
</div>

CSS

@property --aia-voice-call-orb-a {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}
.aia-voice-call-orb {
  --c: var(--aia-color, #7c5cff);
  font-size: var(--aia-size, 16px);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.4;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 1.5em;
  width: 24em;
  padding: 1.3em 1.4em;
  box-sizing: border-box;
  border-radius: 1.2em;
  color: #f4f4f5;
  background: linear-gradient(180deg, #17171d, #0d0d11);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08), 0 1em 2em -1em rgba(0, 0, 0, 0.5);
}
.aia-voice-call-orb-orb {
  position: relative;
  width: 6em;
  height: 6em;
  border-radius: 50%;
  overflow: hidden;
  isolation: isolate;
  background: color-mix(in srgb, var(--c) 55%, #000);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--c) 40%, transparent), 0 0 0 0 color-mix(in srgb, var(--c) 25%, transparent);
  animation:
    aia-voice-call-orb-talk 2.2s cubic-bezier(0.45, 0, 0.55, 1) infinite,
    aia-voice-call-orb-rings 2.2s cubic-bezier(0.2, 0.6, 0.35, 1) infinite;
}
.aia-voice-call-orb-orb::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at 32% 24%, rgba(255, 255, 255, 0.6), transparent 34%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18), inset 0 -0.7em 1.3em rgba(0, 0, 0, 0.4);
}
.aia-voice-call-orb-swirl {
  position: absolute;
  inset: -20%;
  z-index: -1;
  background: conic-gradient(from var(--aia-voice-call-orb-a), var(--c), color-mix(in oklab, var(--c) 35%, #3ddcff), color-mix(in srgb, var(--c) 25%, #fff), color-mix(in srgb, var(--c) 60%, #000), var(--c));
  filter: blur(0.7em);
  animation: aia-voice-call-orb-spin 5s linear infinite;
}
.aia-voice-call-orb-swirl-back {
  inset: 10%;
  border-radius: 50%;
  background: conic-gradient(from var(--aia-voice-call-orb-a), transparent, color-mix(in oklab, var(--c) 40%, #ff6fb5), transparent 55%);
  mix-blend-mode: screen;
  animation-duration: 3.4s;
  animation-direction: reverse;
}
.aia-voice-call-orb-body {
  display: grid;
  gap: 0.3em;
  justify-items: start;
}
.aia-voice-call-orb-name {
  font-size: 1.1em;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.aia-voice-call-orb-meta {
  display: flex;
  align-items: center;
  gap: 0.5em;
  font-size: 0.82em;
  font-variant-numeric: tabular-nums;
  color: rgba(255, 255, 255, 0.6);
}
.aia-voice-call-orb-eq {
  display: flex;
  align-items: center;
  gap: 0.15em;
  height: 1em;
}
.aia-voice-call-orb-eq i {
  width: 0.18em;
  height: 0.4em;
  border-radius: 1em;
  background: color-mix(in srgb, var(--c) 40%, #fff);
  animation: aia-voice-call-orb-eq 0.7s ease-in-out infinite alternate;
}
.aia-voice-call-orb-eq i:nth-child(2) { animation-duration: 0.5s; animation-delay: -0.2s; }
.aia-voice-call-orb-eq i:nth-child(3) { animation-duration: 0.8s; animation-delay: -0.4s; }
.aia-voice-call-orb-actions {
  display: flex;
  gap: 0.5em;
  margin-top: 0.6em;
}
.aia-voice-call-orb-mute,
.aia-voice-call-orb-end {
  height: 2.3em;
  border: 0;
  border-radius: 99em;
  font: inherit;
  font-size: 0.85em;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
}
.aia-voice-call-orb-mute {
  display: grid;
  place-items: center;
  width: 2.3em;
  padding: 0;
  background: rgba(255, 255, 255, 0.1);
}
.aia-voice-call-orb-mute svg {
  width: 1.1em;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}
.aia-voice-call-orb-end {
  padding: 0 1.1em;
  background: #e5484d;
}
.aia-voice-call-orb-mute:focus-visible,
.aia-voice-call-orb-end:focus-visible { outline: 2px solid color-mix(in srgb, var(--c) 50%, #fff); outline-offset: 0.15em; }
@keyframes aia-voice-call-orb-spin {
  to { --aia-voice-call-orb-a: 360deg; }
}
@keyframes aia-voice-call-orb-talk {
  0%, 100% { scale: 1; }
  20% { scale: 1.06; }
  38% { scale: 0.99; }
  58% { scale: 1.08; }
  78% { scale: 1.01; }
}
@keyframes aia-voice-call-orb-rings {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--c) 40%, transparent), 0 0 0 0 color-mix(in srgb, var(--c) 25%, transparent); }
  100% { box-shadow: 0 0 0 0.9em transparent, 0 0 0 1.6em transparent; }
}
@keyframes aia-voice-call-orb-eq {
  to { height: 1em; }
}
@media (prefers-reduced-motion: reduce) {
  .aia-voice-call-orb-orb,
  .aia-voice-call-orb-swirl,
  .aia-voice-call-orb-eq i { animation: none; }
}

@media (prefers-reduced-motion: reduce) {
  .aia-voice-call-orb, .aia-voice-call-orb *, .aia-voice-call-orb::before, .aia-voice-call-orb::after, .aia-voice-call-orb *::before, .aia-voice-call-orb *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

Customizing this snippet

  • Color: set --aia-color on the element or a parent. Currently previewing #3b82f6.
  • Base size: set --aia-size. Every other dimension is in em, so the whole thing scales together. Currently previewing 16px.
  • Speed: change the duration on the transition or animation shorthand. Staggered delays are relative, so they keep their rhythm.
  • Reduced motion: the rule at the end of the CSS turns the motion off for people who asked their OS for less of it. Keep it.

Similar ai animations