Dual Ring Spinner

Two counter-rotating rings for a premium feel.

Tailwind CSS
<div class="relative w-12 h-12" role="status" aria-label="Loading">
  <div class="absolute inset-0 rounded-full border-4 border-transparent border-t-indigo-600 border-b-indigo-600 animate-spin"></div>
  <div class="absolute inset-2 rounded-full border-4 border-transparent border-t-purple-400 border-b-purple-400 animate-spin" style="animation-direction: reverse; animation-duration: 1.5s"></div>
</div>

Free to use in personal and commercial projects. No attribution required.

Variants

Same component, different looks. Preview each one live and copy the code you like.

Ocean

Sky and teal rings for fresh modern loading states.

Tailwind CSS

Large

Oversized version for splash screens and full page loads.

Tailwind CSS

Mono

Grayscale rings for monochrome brands and formal products.

Tailwind CSS

About this dual ring spinner

Two counter-rotating rings turn a basic spinner into something premium. The outer indigo ring spins clockwise while the inner purple ring spins counter-clockwise at a different speed. The opposing motion catches the eye without being distracting.

This dual spinner uses two absolute rings with border-t and border-b colored (transparent elsewhere) rotating in opposite directions. The 1.5s reverse duration on the inner ring creates the phase difference.

Use it where a single spinner would feel plain: app boot screens, payment processing, AI generation. The extra polish signals that something substantial is happening.

A single spinner is honest for routine waits, but some moments carry more weight: money moving, an app booting, AI generating an answer. Users scrutinize these moments harder, and a plain spinner can feel cheap next to the stakes. The dual ring adds crafted motion that matches the visual weight to the moment: two rings working against each other say serious machinery is running in a way one ring cannot.

Two absolute rings share the wrapper. The outer ring is border-4 border-transparent with border-t-indigo-600 border-b-indigo-600, spinning normally with animate-spin. The inner ring sits at inset-2 with border-t-purple-400 border-b-purple-400 and an inline style of animation-direction: reverse with a 1.5s duration. The opposing directions and mismatched speeds create the phase interplay that makes the motion feel engineered rather than decorative.

Widen the speed gap (1s versus 2s) for hypnotic energy, or narrow it (1s versus 1.2s) for a near-synchronous calm. Use analogous colors like indigo and sky for harmony, or complementary colors like indigo and amber for tension. Scale the whole assembly to w-16 h-16 for full-screen moments like boot screens, where the extra presence is warranted.

The mistake is painting both rings the same color. Counter-rotation is only visible when the eye can tell the rings apart; identical rings merge into a single blurry band and the engineered interplay collapses into mush. Keep the rings distinguishable by color, or by width if the palette must stay monochrome. The contrast between the rings is the entire effect.

Where to use it

  • ✓ App loading screens
  • ✓ Payment processing
  • ✓ AI content generation
  • ✓ Data sync indicators

Customization tips

Vary the speeds for different feels: closer speeds feel calm, wider gaps feel energetic. Match ring colors to your brand. Increase the gap between rings with larger inset.

Design notes

When to use

Use it where a single spinner would feel plain: app boot screens, payment processing, and AI generation. The counter-rotating rings add polish that signals something substantial is happening. It earns its place in high stakes moments, not everyday ones.

What to avoid

Do not use it for tiny inline loads where the two rings blur into visual noise at small sizes. Do not set the two speeds too close together or the rings look stuck instead of counter-rotating.

Accessibility

Same rules as any spinner: role=status, an aria-label, and a reduced-motion fallback. The extra motion makes the reduced-motion alternative more important here, not less.

Frequently asked questions

How do I make rings spin opposite directions?

Set animation-direction: reverse on one ring, or use a negative animation-delay. Different durations create the phase offset.

When is a fancy spinner appropriate?

For waits over 3 seconds where a basic spinner feels cheap: app boot, payments, AI generation. For quick loads, simpler is better.

Do complex spinners hurt performance?

Two rotating rings are trivial for browsers. They use transform animations which run on the compositor without layout cost.

How do I change the size of a dual ring spinner?

Scale the wrapper and both rings together, and reduce the border widths in proportion. If the outer ring uses a 4px border at 64px, use 2px at 32px. Keep both rings sharing the same center point or the smaller version wobbles as it spins.

How do I keep the two rings centered on each other?

Make the wrapper relative with a fixed size, then position both rings absolute with inset-0 and m-auto, or use flex centering. Both rings need the same center point or they wobble as they spin. This element stacks the rings with absolute positioning inside a sized container.

Can I use different colors for the two rings?

Yes. Give each ring its own border color, for example a brand color on the outer ring and a neutral gray on the inner one. Two colors make the counter-rotation easier to see and let the spinner match your brand. Keep the track portion of each border subtle so the colored arc stands out.

Customize it with our tools