CSS Dot Circle Spinner

A classic ring of eight fading dots, drawn with radial gradients on one element and turned in steps.

  • classic
  • fading
  • radial-gradient
  • steps
  • single element
HTML
<div class="spinner-dot-circle" role="status" aria-label="Loading"></div>
CSS
.spinner-dot-circle {
  --c: #0284c7;
  width: 52px;
  height: 52px;
  background:
    radial-gradient(circle at 50% 9%, var(--c) 4.5px, #0000 5px),
    radial-gradient(circle at 79% 21%, color-mix(in srgb, var(--c) 88%, #0000) 4.5px, #0000 5px),
    radial-gradient(circle at 91% 50%, color-mix(in srgb, var(--c) 76%, #0000) 4.5px, #0000 5px),
    radial-gradient(circle at 79% 79%, color-mix(in srgb, var(--c) 64%, #0000) 4.5px, #0000 5px),
    radial-gradient(circle at 50% 91%, color-mix(in srgb, var(--c) 52%, #0000) 4.5px, #0000 5px),
    radial-gradient(circle at 21% 79%, color-mix(in srgb, var(--c) 40%, #0000) 4.5px, #0000 5px),
    radial-gradient(circle at 9% 50%, color-mix(in srgb, var(--c) 28%, #0000) 4.5px, #0000 5px),
    radial-gradient(circle at 21% 21%, color-mix(in srgb, var(--c) 16%, #0000) 4.5px, #0000 5px);
  animation: spinner-dot-circle-turn 0.9s steps(8) infinite;
}

@keyframes spinner-dot-circle-turn {
  to { transform: rotate(1turn); }
}

@media (prefers-reduced-motion: reduce) {
  .spinner-dot-circle { animation-duration: 2.4s; }
}

About this CSS Dot Circle Spinner

This CSS Dot Circle Spinner is 23 lines of pure CSS (1.0 KB) with no JavaScript and no dependencies. It uses keyframe animations, transforms, radial gradients and custom properties. It works in current versions of Chrome, Edge, Safari and Firefox. It works in any stack: plain HTML, React, Vue, Svelte, Astro, WordPress or Webflow.

CSS features used

Customize it

Change these custom properties to restyle the dot circle spinner without touching the rest of the CSS:

PropertyDefault
--c#0284c7

How to use this dot circle spinner

  1. Copy the HTML and paste it where you want the element to appear.
  2. Copy the CSS into your stylesheet, or inside a <style> tag.
  3. Keep the .spinner-dot-circle class name, or rename it in both places. Then tweak colors, sizes and timing to match your design.
  4. Using React or Next.js? Change class to className in the HTML. The CSS works as is, including in Tailwind projects (put it in your global stylesheet).

Building with an AI tool?

“Copy for AI” copies a short prompt for Cursor, Claude Code, Lovable, Bolt or v0. Your AI tool opens the Markdown version of this snippet and reads the HTML, CSS and setup notes there. If your tool can't open links, with the code instead. More ways to use copy CSS with AI.

Feedback