Skip to content
Animation

Pulse Ring

A ring animation radiating from the center

  • #animation
  • #pulse
  • #loop
  • #status

Install

This item can't be installed yet. Use the source as a reference. Why some items can't be installed

AI prompt

Draw a dot with two concentric rings that scale from 1 to 2.4 while fading out, 2400ms infinite, the second ring delayed by 800ms.
demo.module.csscss
.stage {
  min-height: 100vh;
  display: grid;
  place-items: center;
}

.core {
  position: relative;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--ds-color-brand-blue);
}

.ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--ds-color-brand-blue);
  animation: pulse 2400ms var(--ds-ease-out) infinite;
}

.ring:nth-child(2) {
  animation-delay: 800ms;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 0.8;
  }
  100% {
    transform: scale(2.4);
    opacity: 0;
  }
}
demo.tsxtsx
import styles from "./demo.module.css";

export default function Demo() {
  return (
    <div className={styles.stage}>
      <div className={styles.core}>
        <span className={styles.ring} />
        <span className={styles.ring} />
      </div>
    </div>
  );
}