Soft Fluid Gradient
A deep, hypnotic native WebGL background with an enormous looping ribbon of dark color and fluid illumination.
Installation#
pnpm dlx shadcn@latest add @davinciui/soft-fluid-gradientUsage#
API Reference#
| Prop | Type | Default |
|---|---|---|
speedAnimation rate from 0 to 2. Set to 0 to freeze the current frame. | number | 0.26 |
densityWave density from broad loops to tighter folds. | number | 1 |
maxDprMaximum device pixel ratio used by the canvas backing buffer. | number | 2 |
classNameAdditional classes applied to the full-size background layer. | string | — |
Accessibility#
The whole effect is aria-hidden with pointer-events-none, including canvas and fallback, so assistive technology ignores it. It is a purely decorative background and contributes no focusable controls or text.
Motion#
A single WebGL shader advances simulation time at speed and reshapes loops with density; speed zero freezes the field. It detects prefers-reduced-motion on mount and on change, stopping the frame loop while keeping the current static frame.
Known constraints#
- Requires WebGL; when initialization fails the component keeps a fallback surface instead of the shader.
- Reduced motion stops the fluid animation.
- The gradient is a background layer, so content needs its own contrast and stacking context.
About Soft Fluid Gradient#
Uplift your canvas with a deep, hypnotic field of saturated color and fluid illumination.
The shader moves one enormous ribbon of near-black, deep navy, icy blue, white, and warm beige light through broad organic loops. Its palette is intentionally fixed to preserve the reference aesthetic.
It works as an immersive ambient backdrop, a high-density focal point, or a living digital-art layer behind interface content.
Controls#
- Flow Speed changes the movement from a slow drop to a quicker current.
- Density (Loops)changes the wave detail from broad bends to tighter folds.
View source
Keep in mind
Need a custom component?
I build bespoke UI components & websites tailored to your brand.

