RippleSurface
An ambient surface that ripples where you touch it — built for hero sections and invite panels.
Live — this one is real
The surface
answers.
Click anywhere — ripples propagate outward
Usage
import { RippleSurface } from "mizu-ui";
export function Hero() {
return (
<div
style={{
position: "relative",
display: "grid",
placeItems: "center",
minHeight: 320,
}}
>
<RippleSurface style={{ position: "absolute", inset: 0 }} />
<h1
style={{
position: "relative",
margin: 0,
fontSize: 48,
pointerEvents: "none",
}}
>
Step inside
</h1>
</div>
);
}
Source & setup
Add this component to your project with the shadcn CLI. The command copies its source into your configured UI directory, with base.css, Mizu’s tokens, and the stylesheets that hold its rules. Each rule lives in one stylesheet, so components you add together never repeat CSS. In a project without a components.json, run npx shadcn@latest init 0xuser64bit/mizu/preset first: plain init installs shadcn’s theme into your global CSS. Then load the fonts.
npx shadcn@latest add 0xuser64bit/mizu/ripple-surfaceEvery component imports from its own path, its name in kebab case. To paste the example, replace its mizu-ui import with:
import { RippleSurface } from "@/components/ui/mizu/ripple-surface";For npm imports, import mizu-ui/styles.css once. Fonts are optional via mizu-ui/fonts.css. Override --mizu-* tokens or use className for local styling. Requires React and Motion. A Client Component: its source starts with “use client”.
Inspect lab/RippleSurface.tsx
Source is included in the npm package under src/lab/RippleSurface.tsx.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| auto | boolean | true | Drop an ambient ripple every 2.6s. |
Accessibility
aria-hidden — the surface is decorative.
Motion
Ripples expand and fade on a 1px stroke. Reduced motion paints a static frame.