Ripple Field
React + Tailwind
const css = `
@keyframes loader-ripple-field-wave {
0%, 100% { transform: scale(0.35); opacity: 0.25; }
18% { transform: scale(1.15); opacity: 1; }
40% { transform: scale(0.35); opacity: 0.25; }
}
.loader-ripple-field {
display: grid;
grid-template-columns: repeat(9, 10px);
grid-auto-rows: 10px;
gap: 2px;
}
.loader-ripple-field__dot {
width: 10px;
height: 10px;
border-radius: 50%;
background: light-dark(#373a40, #f1f2f3);
animation: loader-ripple-field-wave 2s cubic-bezier(0.45, 0, 0.55, 1) var(--d) infinite;
}
@media (prefers-reduced-motion: reduce) {
.loader-ripple-field__dot { animation: none; transform: scale(0.5); opacity: 0.5; }
}
`;
const N = 9;
const C = (N - 1) / 2;
export function RippleFieldLoader() {
return (
<>
<style>
{css}
</style>
<div className="loader-ripple-field" role="status" aria-label="Loading">
{Array.from({ length: N * N }, (_, i) => {
// Delay by true distance from the centre, so each wavefront is a circle, not a diamond.
const d = Math.hypot((i % N) - C, Math.floor(i / N) - C);
return (
<span
key={i}
className="loader-ripple-field__dot"
style={{ '--d': `${(d * 0.13).toFixed(3)}s` } as React.CSSProperties}
aria-hidden="true"
/>
);
})}
</div>
</>
);
}Markup where the component goes, CSS in your stylesheet. No JavaScript.
HTML
<div class="loader-ripple-field" role="status" aria-label="Loading">
<span class="loader-ripple-field__dot" style="--d:0.735s" aria-hidden="true"></span>
<span class="loader-ripple-field__dot" style="--d:0.650s" aria-hidden="true"></span>
<span class="loader-ripple-field__dot" style="--d:0.581s" aria-hidden="true"></span>
<span class="loader-ripple-field__dot" style="--d:0.536s" aria-hidden="true"></span>
<span class="loader-ripple-field__dot" style="--d:0.520s" aria-hidden="true"></span>
<span class="loader-ripple-field__dot" style="--d:0.536s" aria-hidden="true"></span>
<span class="loader-ripple-field__dot" style="--d:0.581s" aria-hidden="true"></span>
<span class="loader-ripple-field__dot" style="--d:0.650s" aria-hidden="true"></span>
<span class="loader-ripple-field__dot" style="--d:0.735s" aria-hidden="true"></span>
<span class="loader-ripple-field__dot" style="--d:0.650s" aria-hidden="true"></span>
<span class="loader-ripple-field__dot" style="--d:0.552s" aria-hidden="true"></span>
<span class="loader-ripple-field__dot" style="--d:0.469s" aria-hidden="true"></span>
<span class="loader-ripple-field__dot" style="--d:0.411s" aria-hidden="true"></span>
<span class="loader-ripple-field__dot" style="--d:0.390s" aria-hidden="true"></span>
<span class="loader-ripple-field__dot" style="--d:0.411s" aria-hidden="true"></span>
<span class="loader-ripple-field__dot" style="--d:0.469s" aria-hidden="true"></span>
<span class="loader-ripple-field__dot" style="--d:0.552s" aria-hidden="true"></span>
<span class="loader-ripple-field__dot" style="--d:0.650s" aria-hidden="true"></span>
<span class="loader-ripple-field__dot" style="--d:0.581s" aria-hidden="true"></span>
<span class="loader-ripple-field__dot" style="--d:0.469s" aria-hidden="true"></span>
<span class="loader-ripple-field__dot" style="--d:0.368s" aria-hidden="true"></span>
<span class="loader-ripple-field__dot" style="--d:0.291s" aria-hidden="true"></span>
<span class="loader-ripple-field__dot" style="--d:0.260s" aria-hidden="true"></span>
<span class="loader-ripple-field__dot" style="--d:0.291s" aria-hidden="true"></span>
<span class="loader-ripple-field__dot" style="--d:0.368s" aria-hidden="true"></span>
<span class="loader-ripple-field__dot" style="--d:0.469s" aria-hidden="true"></span>
<span class="loader-ripple-field__dot" style="--d:0.581s" aria-hidden="true"></span>
<span class="loader-ripple-field__dot" style="--d:0.536s" aria-hidden="true"></span>
<span class="loader-ripple-field__dot" style="--d:0.411s" aria-hidden="true"></span>
<span class="loader-ripple-field__dot" style="--d:0.291s" aria-hidden="true"></span>
<span class="loader-ripple-field__dot" style="--d:0.184s" aria-hidden="true"></span>
<span class="loader-ripple-field__dot" style="--d:0.130s" aria-hidden="true"></span>
<span class="loader-ripple-field__dot" style="--d:0.184s" aria-hidden="true"></span>
<span class="loader-ripple-field__dot" style="--d:0.291s" aria-hidden="true"></span>
<span class="loader-ripple-field__dot" style="--d:0.411s" aria-hidden="true"></span>
<span class="loader-ripple-field__dot" style="--d:0.536s" aria-hidden="true"></span>
<span class="loader-ripple-field__dot" style="--d:0.520s" aria-hidden="true"></span>
<span class="loader-ripple-field__dot" style="--d:0.390s" aria-hidden="true"></span>
<span class="loader-ripple-field__dot" style="--d:0.260s" aria-hidden="true"></span>
<span class="loader-ripple-field__dot" style="--d:0.130s" aria-hidden="true"></span>
<span class="loader-ripple-field__dot" style="--d:0.000s" aria-hidden="true"></span>
<span class="loader-ripple-field__dot" style="--d:0.130s" aria-hidden="true"></span>
<span class="loader-ripple-field__dot" style="--d:0.260s" aria-hidden="true"></span>
<span class="loader-ripple-field__dot" style="--d:0.390s" aria-hidden="true"></span>
<span class="loader-ripple-field__dot" style="--d:0.520s" aria-hidden="true"></span>
<span class="loader-ripple-field__dot" style="--d:0.536s" aria-hidden="true"></span>
<span class="loader-ripple-field__dot" style="--d:0.411s" aria-hidden="true"></span>
<span class="loader-ripple-field__dot" style="--d:0.291s" aria-hidden="true"></span>
<span class="loader-ripple-field__dot" style="--d:0.184s" aria-hidden="true"></span>
<span class="loader-ripple-field__dot" style="--d:0.130s" aria-hidden="true"></span>
<span class="loader-ripple-field__dot" style="--d:0.184s" aria-hidden="true"></span>
<span class="loader-ripple-field__dot" style="--d:0.291s" aria-hidden="true"></span>
<span class="loader-ripple-field__dot" style="--d:0.411s" aria-hidden="true"></span>
<span class="loader-ripple-field__dot" style="--d:0.536s" aria-hidden="true"></span>
<span class="loader-ripple-field__dot" style="--d:0.581s" aria-hidden="true"></span>
<span class="loader-ripple-field__dot" style="--d:0.469s" aria-hidden="true"></span>
<span class="loader-ripple-field__dot" style="--d:0.368s" aria-hidden="true"></span>
<span class="loader-ripple-field__dot" style="--d:0.291s" aria-hidden="true"></span>
<span class="loader-ripple-field__dot" style="--d:0.260s" aria-hidden="true"></span>
<span class="loader-ripple-field__dot" style="--d:0.291s" aria-hidden="true"></span>
<span class="loader-ripple-field__dot" style="--d:0.368s" aria-hidden="true"></span>
<span class="loader-ripple-field__dot" style="--d:0.469s" aria-hidden="true"></span>
<span class="loader-ripple-field__dot" style="--d:0.581s" aria-hidden="true"></span>
<span class="loader-ripple-field__dot" style="--d:0.650s" aria-hidden="true"></span>
<span class="loader-ripple-field__dot" style="--d:0.552s" aria-hidden="true"></span>
<span class="loader-ripple-field__dot" style="--d:0.469s" aria-hidden="true"></span>
<span class="loader-ripple-field__dot" style="--d:0.411s" aria-hidden="true"></span>
<span class="loader-ripple-field__dot" style="--d:0.390s" aria-hidden="true"></span>
<span class="loader-ripple-field__dot" style="--d:0.411s" aria-hidden="true"></span>
<span class="loader-ripple-field__dot" style="--d:0.469s" aria-hidden="true"></span>
<span class="loader-ripple-field__dot" style="--d:0.552s" aria-hidden="true"></span>
<span class="loader-ripple-field__dot" style="--d:0.650s" aria-hidden="true"></span>
<span class="loader-ripple-field__dot" style="--d:0.735s" aria-hidden="true"></span>
<span class="loader-ripple-field__dot" style="--d:0.650s" aria-hidden="true"></span>
<span class="loader-ripple-field__dot" style="--d:0.581s" aria-hidden="true"></span>
<span class="loader-ripple-field__dot" style="--d:0.536s" aria-hidden="true"></span>
<span class="loader-ripple-field__dot" style="--d:0.520s" aria-hidden="true"></span>
<span class="loader-ripple-field__dot" style="--d:0.536s" aria-hidden="true"></span>
<span class="loader-ripple-field__dot" style="--d:0.581s" aria-hidden="true"></span>
<span class="loader-ripple-field__dot" style="--d:0.650s" aria-hidden="true"></span>
<span class="loader-ripple-field__dot" style="--d:0.735s" aria-hidden="true"></span>
</div>CSS
@keyframes loader-ripple-field-wave {
0%, 100% { transform: scale(0.35); opacity: 0.25; }
18% { transform: scale(1.15); opacity: 1; }
40% { transform: scale(0.35); opacity: 0.25; }
}
.loader-ripple-field {
display: grid;
grid-template-columns: repeat(9, 10px);
grid-auto-rows: 10px;
gap: 2px;
}
.loader-ripple-field__dot {
width: 10px;
height: 10px;
border-radius: 50%;
background: light-dark(#373a40, #f1f2f3);
animation: loader-ripple-field-wave 2s cubic-bezier(0.45, 0, 0.55, 1) var(--d) infinite;
}
@media (prefers-reduced-motion: reduce) {
.loader-ripple-field__dot { animation: none; transform: scale(0.5); opacity: 0.5; }
}Goal: Create a "Ripple Field" loader.
Visual behavior: A 9x9 field of dots with ripples spreading outward from the centre, each dot swelling and brightening as a wavefront passes.
Technique:
- Eighty-one dots in a CSS grid share a 2s keyframe that swells each from 0.35 to 1.15 scale and back.
- Each dot's delay is its true distance from the centre times 0.13s; using hypot rather than grid steps makes each wavefront a circle, not a diamond.
Accessibility: The root has role="status" and aria-label="Loading"; everything inside is decorative. Under prefers-reduced-motion the dots sit still at half size.
My stack: {{USER_STACK}}
My styling: {{USER_STYLING}}
My constraints: {{USER_CONSTRAINTS}}
My colors: neutral only. Black, white and grays, no hues. Use the color values above as written, or my project's closest neutral tokens.
Return a single self-contained component. No dependencies.Goal: Create a "Ripple Field" loader.
Visual behavior: A 9x9 field of dots with ripples spreading outward from the centre, each dot swelling and brightening as a wavefront passes.
Technique:
- Eighty-one dots in a CSS grid share a 2s keyframe that swells each from 0.35 to 1.15 scale and back.
- Each dot's delay is its true distance from the centre times 0.13s; using hypot rather than grid steps makes each wavefront a circle, not a diamond.
Accessibility: The root has role="status" and aria-label="Loading"; everything inside is decorative. Under prefers-reduced-motion the dots sit still at half size.
My stack: {{USER_STACK}}
My styling: {{USER_STYLING}}
My constraints: {{USER_CONSTRAINTS}}
My colors: use my project's existing color tokens. The color values above are grayscale placeholders. Map each one by its role (surface, text, border, accent, glow) to my theme, and keep their relative lightness so contrast and the effect still read.
Return a single self-contained component. No dependencies.Paste into Claude, ChatGPT or Cursor after filling in {{USER_STACK}}, {{USER_STYLING}} and {{USER_CONSTRAINTS}}. Neutral keeps the greys you see here; Match my project asks the model to map them onto your own colour tokens.
Free to use in any project, commercial included. MIT-0, no attribution required. Licence
About this component
A 9x9 field of dots with ripples spreading outward from the centre, each dot swelling and brightening as a wavefront passes.
- Dependencies
- None
- Difficulty
- Beginner
- Triggers
- continuous, loop, delay stagger
- Techniques
- keyframes, css variables, stagger
- Reduced motion
- Respected
- Theme
- Light and dark (follows your page's color-scheme)
The root has role="status" and aria-label="Loading"; everything inside is decorative. Under prefers-reduced-motion the dots sit still at half size.