Glassmorphism✨ Premium

Glass Ripple Touch

A 260 × 170 px frosted glass surface: every press drops three rings that start from the exact point of the finger or click, 0.15 s apart, and widen from 60 to 180 px while fading in 1 s — several fingers at once make several ripples.

JSClickRipple

Updated

This effect is part of Effect.Labs — 840 vanilla effects, some free, some premium. Glassmorphism has 47 effects, including 6 free. Explore the category →

3 usage examples

Choosing a massage jet — a garden hot tub's touch panel — Glass Ripple Touch example 1

① Choosing a massage jet — a garden hot tub's touch panel

WhenSitting in the water, the bather touches the body zone to massage on the panel: neck, shoulders, lower back, calves.
WhyThe ripples start from the exact touched point: with wet fingers, on a screen seen at an angle, it is the clearest possible feedback — you see the panel understood where you pressed, even before the jet starts. And the water pattern suits the product: the panel seems to sit on the pool.
SettingsSurface enlarged to 404 × 268 px, 22 px corners, set over the tub's water (reflections in repeated radial gradients) that the glass blurs; silhouette and zone pills inside the surface, the zone nearest the press lights up orange. Rings switched to 3 px white (a white @keyframes instead of the original purple, invisible on turquoise).
The river basin touch table — a water museum's exhibition — Glass Ripple Touch example 2

② The river basin touch table — a water museum's exhibition

WhenChildren touch the map of the river Orne under the table's glass to see which way the rain travels to the Channel.
WhyThe ripple at the touched spot shows the table understood the gesture, even with several hands at once: with pointerdown, every finger gets its ripple (measured, two simultaneous fingers). The widening circle also says “the water starts here”, which is what the table wants to get across.
SettingsSurface over the whole table (516 × 336 px); blur brought down to 1.5 px so the map stays readable under the glass, 8% white veil; town names and heading placed inside the surface, sharp. 3 px white rings.
A “touch the water” game for toddlers — a tablet app — Glass Ripple Touch example 3

③ A “touch the water” game for toddlers — a tablet app

WhenA two-year-old taps the tablet screen: every touch makes rings on the pond, where fish swim by.
WhyNo rule to understand: cause and effect are visible at the exact spot of the finger, immediately, every time — which is what a toddler needs. The blurred glass makes the pond deep: the fish and water lilies pass underneath, softened as if under water.
SettingsFull-screen surface with a 14 px tablet frame; 4 px blur over the animated pond (CSS fish); rings enlarged to 80 px at the start (240 px at the end) and white, for imprecise fingers.

How it works

The .lg-ripple-surface surface is a pane of glass: 6% white fill, backdrop-filter: blur(10px) (with its -webkit- form), 12% white border, 16 px corners, overflow: hidden so the ripples do not spill out, and a 10% indigo → pink veil as ::before. The “Click anywhere” label (12 px, 50% white) is centered and lets presses through (pointer-events: none).

The script listens to pointerdown on every [data-ripple-surface]. On each press, it creates three 60 × 60 px div.lg-ripple-rings centered on the touched point (relative to the surface), with 0, 0.15 and 0.3 s delays, and removes them 1.2 s later. The lgRippleExpand animation (1 s, ease-out, forwards) takes them from scale(0) to scale(3) — 180 px across — while opacity falls to 0 and the 2 px border goes from 60% purple to transparent. Measured 550 ms after the press in Chromium 151: scales 2.25 / 1.77 / 1.19 and opacities 0.25 / 0.41 / 0.60 (2.23 / 1.74 / 1.17 in Firefox 153); at 1,350 ms, no ring left in the page.

Two choices make the glass readable and the ripple reliable. The surface sits in a .lg-ripple-backdrop setting — three sharp-edged discs (indigo, pink, cyan), fine hatching and a night background — that runs under its edges: you see the discs sharp around it, blurred behind it. Over a flat color, a 10 px blur would have nothing to blur and the glass would come down to a gray rectangle; replace that setting with your own picture. And the listener is pointerdown, not click: measured in Chromium with touch, two fingers put down together produce no click, hence no ripple, whereas with pointerdown each finger gets its own (2 presses, 6 rings), and the ripple starts on contact instead of waiting for the finger to lift.

Accessibility

  • Visual feedback, not a control: the surface is a div, with no role and no keyboard focus (measured: Tab does not stop on it). The ripple says “I felt your finger”; if the press triggers an action (picking a zone, starting a game), that action must also exist on a real <button> or link placed in the surface — the ripple comes on top.
  • Motion: the ripple only happens on press, but no prefers-reduced-motion rule is provided. Add @media (prefers-reduced-motion: reduce) { .lg-ripple-ring { animation-duration: .4s; animation-delay: 0s !important } } for a single short ripple, or display: none for none.
  • Contrast: the purple rings going from 60% to 0% are decoration; on a turquoise or light background they almost vanish (see the scenes, switched to white). The 50% white label measures 5.2:1 on the surface over a dark background; on your picture, check it.
  • Accidental presses: with pointerdown, starting a finger scroll on the surface also triggers a ripple. Harmless as long as the ripple stays visual feedback; if the surface triggers an action, fire it on release (click on the button), not on press.

Browser compatibility

JS: pointerdown, getBoundingClientRect, createElement, setTimeout. CSS: transform + opacity animation, backdrop-filter (and -webkit-), overflow: hidden. Zero dependencies. Measured in Chromium 151 and Firefox 153 (mouse): three rings, same scales within 2%, removed at 1.2 s, no error; in Chromium with emulated touch: a triple ring per finger, two simultaneous fingers included.

Chrome 55+✓ Full
Firefox 59+✓ Full (blur from Firefox 103)
Safari 13+✓ Full
Edge 79+✓ Full
Mobile iOS 13+✓ Full, one ripple per finger
Android Chrome 55+✓ Full, one ripple per finger

Without backdrop-filter (Firefox before 103), the surface stays translucent with no blur; the ripples work. Without pointer events (Safari before 13), no ripple appears: replace pointerdown with click if you must cover those versions.

The code

HTML structure to paste into your page (the CSS + JS come with Premium):

index.html — structure
<div class="demo-preview">
  <div class="lg-ripple-backdrop">
    <div class="lg-ripple-surface" data-ripple-surface="">
      <span class="lg-ripple-label">…</span>
      <!-- div.lg-ripple-ring × 3 per press, added then removed by the script -->
    </div>
  </div>
</div>
Unlock the full code — $9.90/mo incl. tax

The full HTML + CSS + JS of Glass Ripple Touch, ready to paste — plus all 840 effects. Or $299 once, lifetime access.

Customize

Options passed to the API or data-* attributes:

Option / propertyDefaultEffect
Ripple color (CSS — @keyframes lgRippleExpand, border-color) purple rgba(139,92,246,.6) → transparent The color lives in the animation, not in .lg-ripple-ring: a border-color rule on the ring changes nothing. Edit both steps of the @keyframes — white rgba(255,255,255,.95) → .2 on a colored background or water.
Size and reach (JS — o.style.width = "60px"; CSS — scale(3)) 60 px at the start, 180 px at the end The starting size is written by the script (with the − 30 offset to center it); the reach is the final scale. scale(5) crosses a large surface; for children's fingers, 80 px at the start.
Number and rhythm of rings (JS — c < 3, .15 * c; removal at 1200 ms) 3 rings, 0.15 s apart, removed at 1.2 s 2 rings 0.25 s apart give a slower ripple, 4 at 0.1 s a vibration. Keep the removal longer than duration + last delay (1 s + 0.3 s): at 1.2 s, the third ring is removed just before it finishes fading, invisibly.
Glass blur and tint (CSS — .lg-ripple-surface, ::before) 10 px blur, 6% white, 10% indigo → pink veil 1-2 px when the background must stay readable (a map, a plan), 10-16 px for a plain material. The ::before veil tints the glass: switch it to your colors or remove it.
Setting behind the glass (CSS — .lg-ripple-backdrop) three sharp discs, hatching, night background, 28 × 36 px margin around the surface It is there so the blur shows in the demo. On your page, delete the div and its rule, and set the surface over your own picture or content.
Triggering event (JS — "pointerdown") on press, one finger = one ripple "click" waits for release and ignores multi-finger presses (measured: 0 ripples); only useful to cover Safari before 13.

FAQ

Two possible causes. Their original color is a 60% purple that fades in 1 s: on a turquoise, green or light background, it disappears. Change it in the @keyframes lgRippleExpand (a border-color rule on .lg-ripple-ring is overridden by the animation). And if the surface is on a flat background, the glass itself does not show: keep the provided setting or put the surface over a picture.
Yes: the script listens to pointerdown, which the browser sends for every finger. Measured in Chromium with touch: two fingers put down together, two triple ripples. A click listener would produce nothing in that case — the browser does not send a click for a multi-finger press. On a kiosk or touch table, also check that the operating system does not turn two fingers into a zoom gesture: touch-action: none on the surface prevents it.
The Material ripple is button feedback: a blot that fills the button from the press point and fades. Here it is a material: three thin concentric circles crossing a whole surface, like a drop on water, filling nothing. Pick it for a large touch area (a panel, a map, a game); for a button, prefer a button ripple, shorter and contained.