Fluid Simulation HeroA full bleed hero on a real time WebGL fluid simulation.

PremiumBlocksHero sectionProduct launch pageCreative studio site

Add to your projectPremium block

One command adds this component to your project.

1

Run the following command. New project? Run npx shadcn@latest init first to set up Tailwind and path aliases.

npx shadcn@latest add @aicanvas/••••••••••••
2

For dark mode, add the dark class to your <html> element:

Optional
<html class="dark">

Install with AI Canvas MCP

With AI Canvas MCP, your AI knows every component we ship. Ask for one inside Claude Code, Codex, or Cursor and it installs the component you pick. Works with any AI Canvas account, free or premium.

Props

Every prop this component accepts. Any other prop is forwarded to the underlying element.

FluidNavItem

PropTypeDefaultDescription
labelreqstring-Link text shown in the top right nav.
hrefreqstring-Link target.

FluidTypography

PropTypeDefaultDescription
fontFamilyreqstring-Family for all UI text. Empty inherits the surrounding page font.
displayFontFamilyreqstring-Family for the oversized watermark only.
watermarkStylereqstring-Watermark slant, 'italic' or 'normal'. Families with no real italic get a browser faked one that leans the glyphs together, which watermarkTracking buys back.
watermarkTrackingreqstring-Letter spacing on the watermark. At 460px every 0.01em is another 4.6px between glyphs.
eyebrowSizereqstring-Font size of the small label above the headline.
headlineSizereqstring-Font size of the h1. Any CSS length, clamp() included.
headlineWeightreqnumber-Font weight of the h1.
headlineTrackingreqstring-Letter spacing of the h1.
headlineLeadingreqnumber-Line height of the h1, unitless.
sublineSizereqstring-Font size of the paragraph under the headline.
ctaSizereqstring-Font size of the pill button label.
hintSizereqstring-Font size of the stir hint in the bottom right corner.
wordmarkSizereqstring-Font size of the top left wordmark.
navSizereqstring-Font size of the nav links.
watermarkSizereqstring-Font size of the watermark bleeding off the lower left corner.

FluidPalette

PropTypeDefaultDescription
groundreqstring[]-Three background wash stops, painted at 155 degrees in the display shader.
vignettereqstring-Colour mixed into the corners of the wash.
vignetteAlphareqnumber-Vignette strength, 0 to 1.
corereqstring-Dye colour where density is highest.
bodyreqstring-Dye colour at working density.
tailreqstring-Dye colour in the thin trailing filaments.
iridescenceAreqstring-Thin film lip on the leading side of a filament.
iridescenceBreqstring-Thin film lip on the trailing side.
iridescencereqnumber-Strength of both lips, 0 to 1.
veilreqstring-Colour the fluid pushes the headline toward as it passes over.
veilMaxreqnumber-Veil alpha ceiling, 0 to switch the veil off entirely. If you turn it on, 0.4 keeps the headline above 4.5:1.
textreqstring-Headline colour.
textSoftreqstring-Nav, eyebrow and sub line colour.
watermarkreqstring-Colour of the oversized script watermark.
pillBgreqstring-Call to action background.
pillFgreqstring-Call to action label colour.

FluidAnchor

PropTypeDefaultDescription
xreqnumber-Horizontal position of the mass, 0 to 1 across the canvas.
yreqnumber-Vertical position, 0 to 1, measured from the BOTTOM of the canvas.
rreqnumber-Emitter orbit radius in short edge units. The visible mass ends up roughly three times this across.

FluidComposition

PropTypeDefaultDescription
widereqFluidAnchor-Used from 768px of frame width up, where the type sits beside the mass.
narrowreqFluidAnchor-Used below 768px, where the composition stacks with the mass on top.

FluidIntro

PropTypeDefaultDescription
durationreqnumber-Seconds the fluid takes to grow from one point into the resting mass. 0 opens on the settled composition instead.
burstreqnumber-Outward kick on the ignition frame, as a multiple of the running spawner velocity.
overshootreqnumber-How far past the resting radius the ring swells mid bloom before easing back. 1 is no overshoot.
textDelayreqnumber-Seconds from mount before the first text element arrives.
textStaggerreqnumber-Seconds between one arriving text element and the next.

FluidSimulationHero

PropTypeDefaultDescription
headlinestring[]['Every pixel moves', 'like water']Headline lines, rendered as a real h1.
eyebrowstring''Small label above the headline. Empty by default, so nothing renders and the headline takes the top of the block; pass a string to bring it back.
sublinestring'A live Navier Stokes surface...'Paragraph under the headline.
hintstring'Drag anywhere to stir the surface'Caption shown only to fine pointers with motion enabled.
wordmarkstring'Fluid Simulation Hero'Top left wordmark.
watermarkstring'fluid'Oversized script watermark bleeding off the lower left corner.
navItemsFluidNavItem[]NAVUp to three nav links. Below 1024px all of them fold into a menu behind a button rather than any of them being dropped.
wordmarkHrefstring'#'Target of the top left wordmark link.
ctaLabelstring'Start a project'Label of the pill button.
onCtaClick() => void-Called when the pill button is pressed.
paletteFluidPalettePALETTEThe full colour set. This hero is light only; there is no dark variant to fall back to.
typographyFluidTypographyTYPOFonts and the full type scale. fontFamily empty inherits the page font; displayFontFamily styles the watermark alone, and watermarkStyle must drop to 'normal' for any family with no real italic.
compositionFluidCompositionCOMPOSITIONWhere the mass sits and how large it is, one anchor per frame width. `wide` hangs it in the upper right with the type beside it; `narrow` stacks, mass on top and type under. The switch is the same 768px the text block uses, read live, so a rotation or a window drag re-aims the composition with no remount.
introFluidIntroINTROThe arrival. The fluid is ignited on the first frame and grows into the resting mass while the type lands on the same clock. Set duration to 0 to open on the settled composition with no bloom. Reduced motion skips the whole thing and gets the settled still.
chromeInsetTopstring'clamp(16px, 2.5vw, 32px)'Distance from the top edge to the wordmark and nav.
chromeInsetSidestring'clamp(32px, 3.8vw, 48px)'Distance from the left and right edges. Larger than the top on purpose, see the note at the destructure.
simResolutionnumber192Velocity and pressure grid on the short edge. Lower is faster and softer.
dyeResolutionnumber640Dye grid on the short edge, clamped to the canvas. This is the detail you actually see.
curlnumber8Vorticity confinement strength. Zero kills the filaments. Against this much injection it boils well before 50; the old 15 already frothed the mass instead of folding it.
densityDissipationnumber0.975Per frame dye decay, and the number the rest of the set is balanced against. Near 1 keeps structure alive for many seconds and turns the surface still; raise it without pulling spawnAmplification, spawnVelocity and splatRadius down with it and the mass sprawls across the frame.
velocityDissipationnumber0.952Per frame velocity decay.
pressureIterationsnumber12Jacobi iterations per step. Fewer is faster and looser.
splatRadiusnumber0.0028Injection radius as a fraction of the short edge. Wide, because a single pointer stroke is one point here rather than a whole source texture, and a fine one disappears against this dye decay.
splatForcenumber5400Velocity injected per unit of pointer travel.
intensitynumber1Master multiplier on every splat and on the spawner, 0 to 1.
normalEpsilonnumber0.005Flat area guard in the surface normal pass. Larger softens the iridescent film, smaller sharpens and speckles it.
iridescenceStrengthnumber1Master multiplier over the palette's iridescence value. Zero removes the thin film entirely.
spawnAmplificationnumber0.03Dye the spawner injects per frame. This is what holds the resting mass together with no pointer on screen; raise it and the mass gets denser, not bigger.
spawnVelocitynumber27Velocity the spawner injects per frame, in grid texels per second. This sets how fast the mass turns over, and it is the difference between a bloom of colour and something that throws filaments. It stays contained this high only because the dye is spent quickly; see densityDissipation.
classNamestring-Extra classes merged onto the outermost root element.

About Fluid Simulation Hero

Fluid Simulation Hero is a full-bleed landing section running a real-time Navier-Stokes solver on the GPU: velocity and dye advect through curl, vorticity, and Jacobi pressure passes, then a surface-normal pass lays an iridescent thin film along the filaments. It arrives by being born rather than faded in: the surface ignites from a single point and blooms into its resting mass while the type lands on the same clock. Drag or touch anywhere and the pointer stirs the dye directly, and the pointer itself becomes a glass lens that frosts to name whatever it is over. Left alone, a spawner keeps the mass slowly turning, beside the headline on a wide frame and above it on a narrow one. It is raw WebGL2 with a WebGL1 fallback and a painted CSS wash for machines that cannot run either, no shader library and no 3D engine. Headline, nav, wordmark, and call-to-action pill sit above the canvas as real DOM text, the nav folding into a menu on small screens, and reduced-motion visitors get a settled still frame.

Built with

WebGLTailwind CSS

Frequently asked questions

Is Fluid Simulation Hero free to use?
Fluid Simulation Hero is a Premium AI Canvas block. Premium unlocks the full source code, the full remix prompt, and one-command installs for every Premium component, block, and template.
How do I install Fluid Simulation Hero?
Premium unlocks one-command installs: run the shadcn CLI with your AI Canvas token, or connect the AI Canvas MCP server and ask your AI editor to install it for you. Premium also unlocks the full remix prompt in the Remix panel.
What is Fluid Simulation Hero built with?
Fluid Simulation Hero is built with React and TypeScript, using WebGL and Tailwind CSS.
Where would I use Fluid Simulation Hero?
Common uses include Hero section, Product launch page, and Creative studio site. Like every AI Canvas block, it is self-contained and drops into any React project.
Can I remix Fluid Simulation Hero with AI?
Yes. Open "Remix with AI" on this page to read the setup and the constants Fluid Simulation Hero is built from. The engine, the markup and the notes on how it works are part of Premium. For the exact block, install it with the one-command CLI.

More like this