Liquid Blob

A drop of liquid chrome slowly reshaping in a studio.

Still frame of Liquid Blob: a drop of liquid chrome slowly reshaping in a studio
Still frame

Installation

pnpm dlx shadcn@latest add @gradients-pro/liquid-blob

Needs a Pro account and the Pro registry setup.

Usage

import { LiquidBlob } from "@/components/liquid-blob";

<LiquidBlob className="h-[560px]">{children}</LiquidBlob>;

It fills its box, so give it a height. Children render on top.

Props

PropTypeDefaultDescription
palette"mercury", "gilt", "opal""mercury"One of the curated palettes.
appearance"auto", "dark", "light""auto"Which version of the palette to use. auto follows a dark or light class (or data-theme) on <html>, then the OS setting.
colorsstring[]palette2 to 6 CSS colours, var(--x) included. Replaces the palette's colours.
backgroundstringpaletteReplaces the palette's background.
sizenumber10.25 to 4. Size of the drop.
stretchnumber0.50 to 1. How far the drop pulls apart as it moves.
softnessnumber0.250 to 1. Softer reflections and a wider horizon.
grainnumber0.080 to 1. Film grain.
speednumber0.60 to 2. How fast it moves; 0 holds a still frame.
paramsPartial<GradientParams>noneAny other engine param, applied last.
classNamestringnoneClasses for the outer box. Give it a size, for example h-[560px].
styleCSSPropertiesnoneInline styles for the outer box.
childrenReactNodenoneContent drawn above the background.