Backgrounds

Fluid simulation

A real-time fluid you stir with the pointer, leaving iridescent ink that swirls and fades.

Paste it into ChatGPT, Claude, Cursor or v0.
swirl18
ink lifetime0.92
brush0.22
intensity0.65

Usage

import { FluidBackground } from '@vizzele/react/gl';

<section style={{ position: 'relative' }}>
  <FluidBackground curl={28} dissipation={0.92} />
  <h1>Stir me</h1>
</section>

Props

PropTypeDefaultDescription
curlnumber18Vorticity — how much it swirls.
dissipationnumber0.92Ink lifetime (higher lasts longer).
velocityDissipationnumber0.2How fast motion calms down.
splatRadius / splatForcenumber0.22 / 5200Brush size and push.
intensitynumber0.65Ink brightness.
ambientbooleantrueRandom drops when idle.
simResolution / dyeResolutionnumber128 / 768Quality (halved on low-end).
colorsstring[]iridescent paletteFour hex colors.

Accessibility

  • The canvas is aria-hidden and never takes pointer events — content on top stays fully interactive.
  • Pauses when off-screen or in a background tab. Renders one still frame with reduced motion.
  • Weak devices get a lower resolution automatically; without WebGL2 a static gradient is shown.