Rings spread out from the middle of a section and pulse gently, fading towards the bottom. Puts the focus on one button, like Book a call.
How to use
Make two files in your project's components folder: ripple-background.tsx and ripple-background.module.css.
Paste the code into each one, keeping the licence note at the top of the component.
It needs nothing beyond React. Your project needs CSS Modules, which Next.js and Vite already have.
Import it where you want it, then change the words, colours and sizes to yours.
The code
import { memo, type ComponentPropsWithoutRef, type CSSProperties } from "react";
import styles from "./ripple-background.module.css";
interface RippleProps extends ComponentPropsWithoutRef<"div"> {
/** Size of the smallest ring in pixels. */
mainCircleSize?: number;
/** Opacity of the smallest ring. Each ring after it is fainter. */
mainCircleOpacity?: number;
numCircles?: number;
/** How much bigger each ring is than the one inside it, in pixels. */
step?: number;
/** Colour of the rings. */
This comes with paid plans
The code for every component comes with paid plans, along with the rest of the AI toolkit. The first component under each heading is free.
import { memo, type ComponentPropsWithoutRef, type CSSProperties } from "react";
import styles from "./ripple-background.module.css";
interface RippleProps extends ComponentPropsWithoutRef<"div"> {
/** Size of the smallest ring in pixels. */
mainCircleSize?: number;
/** Opacity of the smallest ring. Each ring after it is fainter. */
mainCircleOpacity?: number;
numCircles?: number;
/** How much bigger each ring is than the one inside it, in pixels. */
step?: number;
/** Colour of the rings. */
This comes with paid plans
The code for every component comes with paid plans, along with the rest of the AI toolkit. The first component under each heading is free.