Presets
Opinionated Fluid wrappers with tuned physics and visuals.
Presets are zero-config wrappers around the core <Fluid> component. Each one
pins physics constants, visual settings, and opening splats to produce a specific look. Import
a preset and drop it in — no props required.
<script lang="ts">
import { LavaLamp, Plasma, Aurora } from 'svelte-fluid';
</script>
<LavaLamp /> All presets accept width, height, class, style, seed, lazy, splatOnHover, aria-label, and backColor props for sizing, styling, accessibility,
interactive splatting, and adapting the empty-canvas substrate to a host page background.
Presets enable splatOnHover by default; pass splatOnHover={false} to disable pointer-driven splats. Flow-scene presets also expose pointerInput.
Each preset below has a Show code action (the wrapper usage plus the full <Fluid> recipe to fork from) and an Open in Playground link
that loads the exact configuration into the interactive playground. The prop tables are
generated directly from the preset registry, so they always match what the component renders.
LavaLamp
Warm, slow-rising blobs inside a glass rounded-rect vessel on a light-silver background. The blobs never fade and sway with lazy buoyant motion, like real molten wax in a lava lamp.
Container shape: roundedRect (cx: 0.5, cy: 0.5, halfW: 0.38, halfH: 0.45, cornerRadius: 0.15) with glass enabled.
| Prop | Value |
|---|---|
containerShape | roundedRect |
glass | true |
glassRefraction | 0.3 |
glassReflectivity | 0.08 |
glassChromatic | 0.1 |
curl | 5 |
densityDissipation | 0 |
initialDensityDissipation | 0.25 |
initialDensityDissipationDuration | 1 |
velocityDissipation | 0 |
pressure | 0.8 |
splatRadius | 0.75 |
splatForce | 2200 |
shading | true |
colorful | false |
bloom | false |
sunrays | false |
initialSplatCount | 0 |
backColor | { r: 222, g: 218, b: 215 } |
presetSplats | 8 splats |
Plasma
A vivid plasma ball with full-spectrum colors converging from all compass directions and churning at the center. Eight inward jets establish a magnetic-pinch convergence zone with intense bloom glow on a near-black backdrop.
Container shape: none (full canvas).
| Prop | Value |
|---|---|
curl | 40 |
densityDissipation | 0.12 |
initialDensityDissipation | 0.6 |
initialDensityDissipationDuration | 2 |
velocityDissipation | 0.08 |
pressure | 0.8 |
splatRadius | 0.35 |
splatForce | 5000 |
shading | true |
colorful | true |
colorUpdateSpeed | 8 |
bloom | true |
bloomThreshold | 0.6 |
bloomIntensity | 1.5 |
sunrays | true |
sunraysWeight | 0.5 |
initialSplatCount | 0 |
backColor | { r: 4, g: 2, b: 12 } |
presetSplats | 8 splats |
autoSplatRate | 0.4 |
autoSplatCount | 4 |
autoSplatEvenX | false |
autoSplatCenterY | 0.5 |
InkInWater
Concentrated ink droplets sinking through dark water, blooming outward as they fall. Modeled after india ink in a deep tank with organic tendrils from gentle Rayleigh-Taylor instability.
Container shape: none (full canvas).
| Prop | Value |
|---|---|
curl | 8 |
densityDissipation | 0.3 |
velocityDissipation | 0.15 |
pressure | 0.85 |
splatRadius | 0.12 |
splatForce | 800 |
shading | true |
colorful | false |
bloom | true |
bloomIntensity | 0.6 |
bloomThreshold | 0.4 |
sunrays | false |
autoSplatRate | 0.2 |
autoSplatColor | see code |
autoSplatVelocityX | 0 |
autoSplatVelocityY | -180 |
autoSplatCenterY | 0.9 |
initialSplatCount | 0 |
backColor | { r: 6, g: 8, b: 20 } |
presetSplats | 5 splats |
FrozenSwirl
A single dramatic icy whirlpool in a circular vessel that spins itself out and comes to rest. High velocity dissipation freezes the motion fast, leaving a permanent crystalline curl on a deep navy backdrop.
Container shape: circle (cx: 0.5, cy: 0.5, radius: 0.45).
| Prop | Value |
|---|---|
containerShape | circle |
curl | 50 |
densityDissipation | 0 |
velocityDissipation | 1 |
pressure | 0.95 |
splatRadius | 0.5 |
splatForce | 8000 |
shading | true |
colorful | false |
bloom | true |
bloomIntensity | 1 |
sunrays | false |
initialSplatCount | 0 |
backColor | { r: 4, g: 8, b: 24 } |
presetSplats | 3 splats |
Aurora
Northern lights — green, magenta, and pale-blue ribbons layered across a deep night sky. The opening bands have a sideways push, then settle into a luminous steady wash while heavy bloom and sunrays grow the atmospheric glow over time.
Container shape: none (full canvas).
| Prop | Value |
|---|---|
curl | 40 |
densityDissipation | 0 |
velocityDissipation | 0.3 |
pressure | 0.85 |
splatRadius | 0.4 |
splatForce | 6000 |
shading | true |
colorful | false |
bloom | true |
bloomIntensity | 1.5 |
sunrays | true |
sunraysWeight | 1.4 |
initialSplatCount | 0 |
backColor | { r: 2, g: 4, b: 18 } |
presetSplats | 5 splats |
Toroidal
A violent full-spectrum storm circulating in a toroidal ring. Eight high-velocity dye blobs orbit inside an annular container with fierce counter-clockwise flow. Periodic re-injection every 2 seconds keeps the ring fed with fresh color.
Container shape: annulus (cx: 0.5, cy: 0.5, innerRadius: 0.15, outerRadius: 0.42).
| Prop | Value |
|---|---|
containerShape | annulus |
curl | 50 |
densityDissipation | 0.25 |
initialDensityDissipation | 0.6 |
initialDensityDissipationDuration | 2 |
velocityDissipation | 0.02 |
pressure | 0.8 |
splatRadius | 0.4 |
splatForce | 6000 |
shading | true |
colorful | true |
colorUpdateSpeed | 8 |
bloom | true |
bloomThreshold | 0.5 |
bloomIntensity | 1.8 |
sunrays | true |
sunraysWeight | 0.6 |
initialSplatCount | 0 |
backColor | { r: 2, g: 2, b: 10 } |
presetSplats | 8 splats |
CircularFluid
Vivid swirling fluid contained inside a circle. Eight inward jets converge from the compass points, and the circular boundary reflects them back inward to produce a self-sustaining vortex. Automatic splats with orbital swirl sustain the motion.
Container shape: circle (cx: 0.5, cy: 0.5, radius: 0.45).
| Prop | Value |
|---|---|
containerShape | circle |
curl | 35 |
densityDissipation | 0.15 |
initialDensityDissipation | 0.5 |
initialDensityDissipationDuration | 2 |
velocityDissipation | 0.06 |
pressure | 0.8 |
splatRadius | 0.38 |
splatForce | 5000 |
shading | true |
colorful | true |
colorUpdateSpeed | 8 |
bloom | true |
bloomThreshold | 0.6 |
bloomIntensity | 1 |
sunrays | false |
initialSplatCount | 0 |
backColor | { r: 4, g: 2, b: 12 } |
presetSplats | 8 splats |
autoSplatRate | 1.2 |
autoSplatCount | 1 |
autoSplatCenterY | 0.5 |
autoSplatBandHeight | 0.8 |
autoSplatSwirl | 500 |
FrameFluid
Fluid swirling around a rectangular inner cutout, like a living picture frame. Four edge jets create clockwise circulation and four diagonal jets add turbulence at the corners. Accepts optional innerCornerRadius and outerCornerRadius props.
Container shape: frame (cx: 0.5, cy: 0.5, halfW: 0.25, halfH: 0.25).
| Prop | Value |
|---|---|
containerShape | frame |
curl | 30 |
densityDissipation | 0.08 |
initialDensityDissipation | 0.5 |
initialDensityDissipationDuration | 2 |
velocityDissipation | 0.06 |
pressure | 0.8 |
splatRadius | 0.42 |
splatForce | 5000 |
shading | true |
colorful | true |
colorUpdateSpeed | 8 |
bloom | true |
bloomThreshold | 0.6 |
bloomIntensity | 0.9 |
sunrays | false |
initialSplatCount | 0 |
backColor | { r: 0, g: 0, b: 0 } |
presetSplats | 8 splats |
autoSplatRate | 0.5 |
autoSplatCount | 6 |
autoSplatCenterY | 0.5 |
autoSplatBandHeight | 2 |
autoSplatSwirl | 300 |
AnnularFluid
A ring-vortex of fluid contained between two concentric circles. Eight tangential jets establish a counter-clockwise ring vortex. Automatic splats with orbital swirl sustain the motion.
Container shape: annulus (cx: 0.5, cy: 0.5, innerRadius: 0.15, outerRadius: 0.45).
| Prop | Value |
|---|---|
containerShape | annulus |
curl | 35 |
densityDissipation | 0.08 |
initialDensityDissipation | 0.5 |
initialDensityDissipationDuration | 2 |
velocityDissipation | 0.06 |
pressure | 0.8 |
splatRadius | 0.38 |
splatForce | 5000 |
shading | true |
colorful | true |
colorUpdateSpeed | 8 |
bloom | true |
bloomThreshold | 0.6 |
bloomIntensity | 1 |
sunrays | false |
initialSplatCount | 0 |
backColor | { r: 4, g: 2, b: 12 } |
presetSplats | 8 splats |
autoSplatRate | 0.5 |
autoSplatCount | 5 |
autoSplatCenterY | 0.5 |
autoSplatBandHeight | 0.8 |
autoSplatSwirl | 600 |
SvgPathFluid
Fluid flowing inside a bold ampersand "&" glyph, demonstrating text-mode container shapes. The letter is rasterized to a mask texture via Canvas 2D fillText, with evenodd fill rule so the counter (hole) in the glyph stays transparent.
Container shape: svgPath (text: "&", font: "bold 200px Georgia, serif", fillRule: "evenodd").
| Prop | Value |
|---|---|
containerShape | svgPath |
curl | 30 |
densityDissipation | 0.3 |
velocityDissipation | 0.1 |
pressure | 0.8 |
splatRadius | 0.3 |
splatForce | 5000 |
shading | true |
colorful | true |
bloom | true |
bloomIntensity | 0.9 |
sunrays | false |
initialSplatCount | 8 |
backColor | { r: 2, g: 2, b: 8 } |
autoSplatRate | 0.8 |
autoSplatCount | 1 |
autoSplatBandHeight | 2 |
autoSplatSwirl | 400 |
GasFlare
A natural-gas flare plume from a short exit nozzle. A hot vertical jet enters through a physical slot, entrains surrounding fluid, rolls into shear-layer vortices, and rises under temperature-scalar buoyancy with a fire transfer ramp.
Obstructions: two lower slabs form the left and right walls of a flare stack, leaving a center nozzle slot open. The top and side edges drain the plume so hot content can vent instead of saturating the canvas.
Honest physics note: this is an incompressible jet/plume simulation with advected heat scalar and buoyancy. It does not model combustion chemistry, compressibility, soot, radiation, or heat release.
| Prop | Value |
|---|---|
obstructions | 2 obstructions |
flow | FlowConfig — see code |
openBoundary | true |
curl | 16 |
densityDissipation | 0.42 |
initialDensityDissipation | 0.55 |
velocityDissipation | 0.055 |
pressure | 0.85 |
pressureIterations | 24 |
splatRadius | 0.06 |
splatForce | 3800 |
shading | false |
colorful | false |
bloom | true |
bloomIterations | 5 |
bloomResolution | 192 |
bloomThreshold | 0.48 |
bloomIntensity | 1 |
sunrays | false |
sunraysWeight | 0 |
simResolution | 160 |
dyeResolution | 768 |
initialSplatCount | 0 |
backColor | { r: 6, g: 6, b: 8 } |
Venturi
Bernoulli's principle made visible. A gentle left-to-right body force acts like a pressure gradient, pushing fluid through a wide channel that is squeezed through a central throat formed by two concave obstruction islands. The visualization colors the velocity-magnitude field with a CFD-style blue→cyan→green→yellow→red ramp so the throat acceleration is readable instead of appearing as a uniform center jet.
Obstructions: two concave islands (top + bottom) pinching a horizontal channel from a wide inlet to a ~5.3:1 contraction at the throat. Open left/right boundaries let the inlet feed throughflow while the solid obstruction mask forms the throat; laminar (curl 0) so the streamlines stay ordered.
Honest physics note: the throat speed-up is an incompressible, low-speed effect and belongs in the live solver. Pressure/density changes from compressible gas flow are not modeled.
| Prop | Value |
|---|---|
obstructions | 2 obstructions |
flow | FlowConfig — see code |
openBoundary | true |
curl | 0 |
densityDissipation | 0.35 |
velocityDissipation | 0.09 |
maxTimeStep | 0.016666666666666666 |
substeps | 1 |
viscosity | 0.016 |
viscosityIterations | 5 |
wallFriction | 0.16 |
wallFrictionWidth | 2 |
pressure | 0.9 |
pressureIterations | 26 |
splatRadius | 0.055 |
splatForce | 6000 |
shading | false |
colorful | false |
bloom | false |
bloomThreshold | 0.6 |
bloomIntensity | 0.5 |
sunrays | false |
simResolution | 160 |
dyeResolution | 512 |
initialSplatCount | 0 |
backColor | { r: 6, g: 10, b: 14 } |
Karman
Flow past a single cylinder, evocative of a von Kármán vortex street — the alternating wake of vortices shed behind a bluff body in steady cross-flow. A pressure-gradient body force drives the field left to right while a rake of six persistent dye-only streakline sources (one hue each — the classic wind-tunnel smoke-rake, passively riding the flow) feeds continuous colored filaments through the wake. The cylinder is painted via obstructionColor so the bluff body reads as a visible object.
Obstruction: a single cylinder (circle authored as two SVG arcs, radius 10 in a [0,0,100,100] viewBox, fit: 'fill') placed left of center and slightly below the inflow centerline — the deliberate vertical offset breaks symmetry so the wake sheds instead of forming a stable standing pair. All canvas edges are open with dye sponge drains; only the downstream outlet damps velocity.
Honest physics note: this is evocative of a vortex street, not a validated shedding simulation. The cylinder is a rasterized mask, shedding emerges from shear layers rolling up behind the disc, and its frequency is not a real Strouhal number.
| Prop | Value |
|---|---|
obstructions | 1 obstruction |
obstructionColor | { r: 86, g: 98, b: 122 } |
flow | FlowConfig — see code |
openBoundary | true |
curl | 10 |
densityDissipation | 0.7 |
velocityDissipation | 0.075 |
maxTimeStep | 0.008333333333333333 |
substeps | 2 |
viscosity | 0.014 |
viscosityIterations | 8 |
wallFriction | 0.16 |
wallFrictionWidth | 2 |
pressure | 0.9 |
pressureIterations | 34 |
splatRadius | 0.06 |
splatForce | 6000 |
shading | false |
colorful | false |
bloom | false |
sunrays | false |
simResolution | 192 |
dyeResolution | 1024 |
initialSplatCount | 0 |
presetSplats | 5 splats |
backColor | { r: 4, g: 6, b: 14 } |
TeslaValve
A passive Tesla-valve-like channel with a straight conduit and patent-style alternating bypass loops. A pressure-gradient drive carries discrete multicolor left-edge splats through a high-viscosity channel, making dye packets and side-bucket recirculation easier to inspect; forward throughflow is expected.
Geometry: a cropped reference SVG path defines the conduit, side-channel buckets, and internal slots as one even-odd container mask. The filled SVG region is the physical fluid domain, so the slots and walls are solved as part of the same boundary.
Honest physics note: this is a live incompressible throughflow visualization, not a hard-stop check valve. It gives plausible routing, separation, and recirculation cues, but it does not calculate a reverse/forward pressure-drop ratio or real valve rectification.
| Prop | Value |
|---|---|
containerShape | svgPath |
flow | FlowConfig — see code |
curl | 10 |
densityDissipation | 0.36 |
velocityDissipation | 0.085 |
maxTimeStep | 0.016666666666666666 |
substeps | 1 |
viscosity | 0.04 |
viscosityIterations | 10 |
wallFriction | 0.14 |
wallFrictionWidth | 2 |
pressure | 0.9 |
pressureIterations | 30 |
splatRadius | 0.085 |
splatForce | 6000 |
autoSplatRate | 5 |
autoSplatCount | 4 |
autoSplatVelocityX | 190 |
autoSplatVelocityY | 0 |
autoSplatCenterX | 0.035 |
autoSplatBandWidth | 0.024 |
autoSplatCenterY | 0.49 |
autoSplatBandHeight | 0.18 |
shading | false |
colorful | false |
bloom | false |
sunrays | false |
simResolution | 192 |
dyeResolution | 768 |
initialSplatCount | 0 |
backColor | { r: 5, g: 9, b: 12 } |
Overriding Preset Props
Presets hard-code their physics and visual props internally. However, each preset forwards
sizing props (width, height), styling props (class, style), seed, lazy, splatOnHover, aria-label, and backColor directly to the underlying <Fluid> component. Flow-scene presets also forward pointerInput.
If you need to override a pinned physics prop, you have two options:
- Use the base
<Fluid>component directly and copy the preset's prop values as a starting point — the Show code action above gives you the full recipe to paste. - Fork the preset source file into your own component — preset source is short (typically under 100 lines) and self-contained.
Some presets expose additional props beyond the common set. For example, <FrameFluid> accepts innerCornerRadius and outerCornerRadius. Check the preset's exported type for the full list.