Components
Liquid Shapes
Liquid shapes that merge.
Fluid by default
<LiquidShapes>
<Hero />
</LiquidShapes>Installation
npx shadcn@latest add https://ui.zjkm.tech/r/liquid-shapes.jsonimport { LiquidShapes } from "@/components/liquid-shapes"Using JavaScript? Set tsx: false in components.json and the CLI converts it.
New to shadcn? Run npx shadcn@latest init first. The CLI needs components.json and the @/ import alias.
Usage
Blobs drift behind your content, and where they touch they fuse like liquid. It's an SVG filter with the blobs moved by CSS, so there's no script running per frame.
import { LiquidShapes } from "@/components/liquid-shapes";
export function Hero() {
return (
<LiquidShapes className="rounded-2xl bg-neutral-950 p-16">
<h1 className="text-white">Fluid by default</h1>
</LiquidShapes>
);
}Props
| Prop | Type | Default | Description |
|---|---|---|---|
children | ReactNode | Content shown over the shapes. | |
colorFrom | string | "#8b5cf6" | Gradient start colour. |
colorTo | string | "#ec4899" | Gradient end colour. |
speed | number | 10 | Seconds per drift. |
className | string | Classes for the wrapper. |
With reduced motion, the shapes stay still.