Skip to main content
Clever Ops

Voronoi Membrane

A living cell membrane for React, Lloyd-relaxed voronoi walls drawn as canvas hairlines breathe imperceptibly while pointer pressure tenses them; one seeded cell carries the Tailwind primary tint.

Preview & code

Loading Voronoi Membrane preview

Installation

pnpm dlx shadcn@latest add @cleverui/voronoi-membrane

Requires the @cleverui registry in your components.json, a one-off, two-line setup.

Usage

tsx
import { VoronoiMembrane } from '@/components/ui/voronoi-membrane'
Exampletsx
import { VoronoiMembrane } from '@/components/ui/voronoi-membrane'

export default function VoronoiMembraneDemo() {
  return (
    <div className="relative min-h-[600px] overflow-hidden bg-background">
      <VoronoiMembrane />
      <div className="relative z-10 mx-auto flex min-h-[600px] max-w-5xl flex-col justify-end px-6 pb-20 pt-24">
        <p className="font-mono text-[11px] uppercase tracking-[0.2em] text-muted-foreground sm:text-xs">
          Lab · press against the membrane
        </p>
        <h2 className="mt-4 max-w-2xl text-4xl font-semibold tracking-tight text-balance text-foreground sm:text-5xl">
          Alive at one pixel wide.
        </h2>
        <p className="mt-5 max-w-xl text-sm leading-relaxed text-muted-foreground sm:text-base">
          Twenty-four seeded cells relaxed into equilibrium, breathing so slowly you almost miss
          it. Bring the pointer close and the nearest walls draw tight and brighten, one cell
          keeps the accent.
        </p>
      </div>
    </div>
  )
}

API reference

VoronoiMembrane accepts the following props.

PropTypeDefaultDescription
cellsnumber24number of cells (clamped 8–40)
breathenumber1breathing amplitude 0–1, 0 makes the membrane still until touched

…plus everything from React.HTMLAttributes<HTMLDivElement>: className, event handlers, aria attributes and the rest pass straight through.

Frequently asked questions

How do I install the Voronoi Membrane component?

Register the @cleverui registry in your components.json ("@cleverui": "https://cleverops.com.au/r/{name}.json"), then run `npx shadcn@latest add @cleverui/voronoi-membrane`. The shadcn CLI copies the source into your project, you own the code from that point. You can also copy the source directly from this page.

What dependencies does Voronoi Membrane require?

Voronoi Membrane has no npm dependencies beyond React and Tailwind CSS itself, so there is nothing extra to install or keep updated.

Can I theme Voronoi Membrane to match my brand?

Yes. The component is styled entirely with Tailwind utilities over standard design tokens (primary, background, muted, border), so it inherits your existing shadcn/ui theme automatically. Change your CSS variables and the component follows, no source edits needed for palette, radius, or fonts.

Want this built for you?

CleverUI is built by the Clever Ops web team. If you'd rather ship a hand-coded, fast, custom website than assemble one, we build them for Australian businesses every week.

Explore web development services