Grid Shockwave

£5

An interactive tile wall where every click detonates a radial shockwave: tiles pop, flash, and tip away from the epicentre in a distance-staggered ring wave, then settle with elastic overshoot.

intermediate
6 more details
grid-animationstaggershockwavemicro-interaction3d-transformsmouse-follow
Grid Shockwave - GSAP animation effect preview

This demo reads better at your own screen size than in the frame below:

About this effect

A click-detonated tile wall built on GSAP core alone, no plugins. Every click or tap becomes an epicentre: a shockwave ripples outward tile by tile, with each tile's delay computed from its real pixel distance to the click point rather than its grid index, so any CSS grid layout works unmodified. As the wavefront passes, tiles pop in scale and translateZ, flash with a yellow accent burst, and tip away from the epicentre in 3D before settling back with elastic overshoot, while an expanding ring outline traces the wavefront so the eye can follow it. Rapid double-clicks spawn overlapping waves that visibly interfere, and on fine pointers a subtle cursor-proximity field keeps the wall alive between detonations.

What's included

9 items
  • Real-distance wavefront: per-tile delays computed from actual pixel distance to the click point, so any column count or tile size works without configuration
  • Layered response to a single click: scale pop, translateZ lift, accent flash keyed to the wavefront, and a 3D tip directed away from the epicentre
  • Expanding ring outline that traces the wavefront at exactly the wave's travel speed
  • Colour cycling per detonation: pass a list of hex colours and every hit strikes in the next one, with overlapping waves retinting the wall tile by tile as each front lands
  • Overlapping waves interfere cleanly: deliberate GSAP overwrite handling lets a new wavefront take over mid-settle tiles at the moment of impact, never leaving a tile stuck
  • Elastic settle with distance-based energy falloff, so far tiles pop softer than the epicentre
  • Cursor-proximity idle field on fine pointers: nearby tiles lift and tint faintly before the first click, skipped entirely on touch
  • Tap-native on mobile via pointer events with a movement threshold, so scroll gestures over the grid never misfire a wave
  • Keyboard and reduced-motion support: Enter or Space detonates from the centre, and prefers-reduced-motion users get a static wall with a single gentle opacity pulse per click

Perfect for

5 use cases
  • Agency and portfolio hero sections that reward visitors for touching the page
  • 404, coming-soon, and waitlist pages with one irresistible interactive toy
  • Product launch and event pages built around an energy or impact metaphor
  • Interactive backdrops behind headlines on landing pages for games, music, or hardware
  • Feature walls and logo grids that respond to clicks instead of sitting inert

How it works

2 sections

Tile centres are cached from the resting layout and refreshed after a container or tile resize. Each wave schedules impacts by distance divided by speed. On impact, the tile replaces its previous response with a scale and depth pop, a directional 3D tip, an opacity flash, and an elastic settle.

Solid overlays animate opacity directly, and the ring scales at the wavefront’s travel speed. Pointer input is batched once per frame and only changed proximity values restart reusable tweens. Touch skips proximity, reduced motion gets a gentle opacity pulse, and context teardown removes the schedules, overlays, observers and listeners.

Difficulty Intermediate
Includes HTML + JS + CSS source, documentation, AI setup prompt, lifetime updates

Paid effect

Purchase to unlock the code.

Buying Grid Shockwave opens the HTML, CSS and JavaScript source, the full documentation, an AI setup prompt for your editor, and every update we ship to it. Standard license: unlimited personal and commercial projects.

£5 Standard license, unlimited projects

Browse free effects

Documentation

Quick Start

1. Add to your HTML <head>:

Code snippet omitted: it ships with the download.

2. Add before closing </body> tag:

Code snippet omitted: it ships with the download.

3. Add the effect HTML anywhere in your <body>:

Code snippet omitted: it ships with the download.

The script measures the real position of every tile, so the wave works with any column count, tile size, or gap. Change the layout freely in CSS; nothing in the JavaScript needs to know about it. The shipped stylesheet uses 12 columns on desktop, 8 below 900px, and 6 below 560px, hiding surplus tiles at narrow widths so the wall never becomes a scroll-length column.

Using It With Your Own Design

Keep a positioned .shockwave-grid with .shock-tile children. The script adds decorative .shock-tile__lift and .shock-tile__flash spans and removes them on teardown. The grid perspective gives the tiles their shared depth; tile pointer events stay disabled so input reaches the wall. Change --accent for the default wave colour. The full-screen .shockwave-preview, .shockwave-stage and prompt are demo styling and can be removed.

Options

All options are data attributes on the container element.

Attribute Values Default Description
data-shockwave (marker) required Identifies a container the script should power
data-enabled true, false true Set false to leave the wall static
data-wave-speed px per second 1500 Wavefront travel speed. Lower reads as a slower, heavier ripple; above ~2500 the stagger stops being visible
data-intensity 0 to 1.5 1 Scales the pop. Past ~1.5 neighbouring tiles visually collide at full scale
data-tilt degrees 16 Maximum 3D tip of each tile away from the epicentre
data-ring true, false true Expanding ring outline that traces the wavefront
data-proximity true, false true Cursor-proximity idle field (fine pointers only; never runs on touch)
data-proximity-radius px 150 Radius of the proximity field around the cursor
data-colors comma-separated hex (stylesheet accent) Each detonation strikes in the next colour in the list, cycling. Overlapping waves retint the wall tile by tile as each front lands. Omit for a single-colour wall

Accessibility

  • Keyboard: the grid is focusable (tabindex="0", role="button"). Enter or Space detonates a wave from the centre of the wall.
  • Reduced motion: with prefers-reduced-motion: reduce, the wall is static and a click or keypress answers with a single gentle opacity pulse. No wave, no tilt, no ring.
  • Touch: taps detonate natively through pointer events with a movement threshold, so a scroll gesture that starts on the grid passes through without misfiring. The proximity field is skipped entirely on coarse pointers.
  • ARIA: give the container an aria-label describing the interaction, as in the Quick Start markup. The tiles are decorative and need no labels.

Performance Notes

  • Tile centres are computed once from offsetLeft/offsetTop and cached; a resize only marks the cache dirty and it rebuilds lazily on the next interaction. Nothing in the wave loop reads layout.
  • All motion is transform and opacity only, with solid overlay elements instead of animated CSS variables, gradients or glow shadows.
  • The proximity field batches pointer input once per frame and uses gsap.quickTo only for changed values. Tiles outside the field do no animation work.
  • A ResizeObserver invalidates measurements when the container or tiles change size. Teardown cancels pending wave impacts, kills active responses and hover tweens, and removes overlays and listeners.

Dependencies

Required:

  • GSAP 3.12+ (core only, no plugins)

Worked examples, the events and programmatic API, and the class reference ship with the download, alongside the full source.

Your cart

Your cart is empty

The Vault £99

Everything in the catalogue, plus everything we release next.