webdevpuneet.com

Ripple Background — Free HTML CSS JS Radar Pulse Snippet

Ripple Background · Animations · Plain HTML, CSS & JS · Live preview

CategoryAnimations

Copy & paste

Source Code

<section class="rp-hero">
  <div class="rp-ripple" id="rpRipple" aria-hidden="true"></div>
  <div class="rp-content">
    <div class="rp-core">📡</div>
    <h1>Always broadcasting</h1>
    <p>Concentric rings pulse outward from the center — and from wherever you click.</p>
  </div>
</section>

Extend with AI

Take This Snippet Further With AI

The AI prompt for this one is for Patreon supporters ($3 a month, 7 days free), along with a site with no ads. Supporters enter the passcode once and it is remembered in this browser.

· Become a supporter

What's included

Features

Continuous radar pulse
Staggered rings expand and fade forever.
Negative-delay warmup
The full loop is present at first frame.
Click-to-ripple
A burst spawns at the tap point.
Self-cleaning bursts
Each removes itself on animationend.
Glowing source core
A central emblem anchors the signal.
Framing vignette
A radial gradient darkens the edges.
Click-through content
Taps reach the hero through the text.
Pure-CSS animation
JS only creates and wires elements.

About this UI Snippet

Ripple Background — Concentric Radar Rings That Pulse Outward

Screenshot of the Ripple Background snippet rendered live

The ripple background is the radar-like hero where concentric rings continuously expand from a central point and fade as they grow — evoking a signal broadcasting outward. This snippet builds it with plain HTML, CSS, and a little vanilla JavaScript, and adds a satisfying click-to-ripple burst from wherever you tap.

The continuous center pulse

The steady radar effect comes from several rings sharing one expand-and-fade animation but starting at different times. JavaScript creates six .rp-circle rings, all the same maximum size, and gives each a negative animation-delay spaced evenly across the loop (-i * (loop / count)). The negative delay means each ring starts already partway through its animation, so at any moment the rings are at six different sizes — one just emerging at the center while another fades at the edge. The result is a smooth, never-gapping pulse rather than all rings firing together. The rpPulse keyframe scales each ring from 0 to 1 while fading opacity from .7 to 0.

Why negative delays instead of positive

Using negative animation-delay is the trick that makes the loop look established from the very first frame. A positive delay would mean the rings stagger in over the first few seconds, leaving the hero empty at load; a negative delay starts each ring as if the animation had been running forever, so the full radar is present immediately. This is the standard technique for seamless, pre-warmed looping emitters.

Click-to-ripple bursts

Beyond the ambient pulse, a pointerdown anywhere on the hero spawns a one-shot .rp-burst ring at the exact click point. It grows from zero to 340px and fades over 0.9s, then removes itself on animationend so bursts never accumulate. Centering it with translate(-50%, -50%) at the click coordinates makes the ripple emanate from your finger, like dropping a stone in water. This interactive layer makes the otherwise passive backdrop respond to the user.

A glowing core

At the center sits a glowing emblem (here a broadcast icon) with a soft box-shadow, anchoring the rings as the source of the signal. The content sits above the ripple layer with pointer-events: none (so clicks still reach the hero to spawn bursts), and a radial background gradient darkens toward the edges to frame the pulse.

All CSS animation

Both the ambient rings and the click bursts are pure CSS keyframes; JavaScript only creates elements and wires the click. So the per-frame work is on the compositor, and the effect stays smooth even with several rings animating at once.

Customizing it

Change RINGS and MAX for more or larger rings, retime the loop, recolor the ring borders, or adjust the burst size and speed. Make the rings filled instead of outlined, or anchor the source off-center. Pair it with a pulse button call to action or an aurora text headline for a signal-themed hero.

Step by step

How to Use

  1. 1
    Paste HTML, CSS, and JSConcentric rings pulse outward from a glowing core.
  2. 2
    Watch the radarNew rings emerge at the center as outer ones fade.
  3. 3
    Click anywhereA ripple burst expands from the click point.
  4. 4
    Click repeatedlyEach burst cleans itself up after fading.
  5. 5
    Adjust the ringsChange RINGS and MAX for count and size.
  6. 6
    Recolor the pulseEdit the ring border colors.

Real-world uses

Common Use Cases

Signal and radar heroes
Pair with a pulse button call to action, with concentric rings expanding from the centre in a continuous loop.
Live and broadcast pages
Echo a live state from a status dashboard, as the rings evoke a signal broadcasting outward.
IoT and network sites
Set the mood near a particle network, with negative animation delays making the full loop present on the first frame.
Announcement headlines
Frame an aurora text headline for an announcement, with expanding rings that fade softly as they grow outward.
Click-to-ripple interactions
Spawn a burst at the tap point on click, with each one removing itself on animationend so the DOM stays clean.

Got questions?

Frequently Asked Questions

Six rings share one expand-and-fade keyframe but each gets a negative animation-delay spaced evenly across the loop. That offsets them so at any moment they sit at six different sizes — one emerging at the center while another fades at the edge — producing a smooth, never-gapping radar pulse instead of all rings firing together.

A negative delay starts each ring as if the animation had already been running, so the full radar is present from the very first frame at load. A positive delay would stagger the rings in over the first seconds, leaving the hero empty initially. Negative delays are the standard way to pre-warm a seamless looping emitter.

A pointerdown anywhere on the hero creates a burst element at the click coordinates, centered with translate(-50%,-50%). It grows from zero to 340px and fades over 0.9 seconds via a CSS keyframe, then removes itself on animationend so bursts never accumulate. The ripple emanates from exactly where you tapped.

Yes. The content layer is set to pointer-events: none, so taps on the headline pass through to the hero and still spawn a ripple burst. The ambient rings layer is also non-interactive, so only the hero receives the pointerdown that creates bursts.

Render the ambient rings from an array with their negative delays, and handle pointerdown to append a burst element via a ref (or render a managed list and prune on animationend). Keep cleanup in mind so bursts are removed. The keyframes are pure CSS. In Tailwind, define the pulse and burst animations in the config and apply staggered delays with arbitrary values.