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

Premium blockBlocks
Fluid Simulation Hero

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/fluid-simulation-hero
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.

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 768px only the first is shown.
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.
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.
simResolutionnumber256Velocity and pressure grid on the short edge. Lower is faster and softer.
dyeResolutionnumber1024Dye grid on the short edge, clamped to the canvas. This is the detail you actually see.
curlnumber15Vorticity confinement strength. Zero kills the filaments, above 50 boils.
densityDissipationnumber0.997Per frame dye decay. Near 1 keeps structure alive for many seconds.
velocityDissipationnumber0.958Per frame velocity decay.
pressureIterationsnumber12Jacobi iterations per step. Fewer is faster and looser.
splatRadiusnumber0.0015Injection radius as a fraction of the short edge.
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.018Dye 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.
spawnVelocitynumber8Velocity the spawner injects per frame, in grid texels per second. This sets how fast the mass turns over. Push it far past 10 and the mass stops being contained and sprawls across the frame.
classNamestring-Extra classes merged onto the outermost root element.

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 Hero, WebGL, Motion, and Interactive.
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.

Featured in collections

More like this