tween
ComponentsTemplatesShowcaseContact

Command Palette

Search for a command to run...

Getting Started
  • Introduction
  • Installation
  • StoryNew
Guides
  • Motion Principles
  • Scroll and Smooth Scroll
  • Performance and Accessibility
Scroll Animations
  • Sticky Cards Scroll
  • Rise Fan Cards Scroll
  • Rotate Stack Scroll
  • Doodle Lens ScrollNew
  • Slit Open Hero ScrollNew
  • Logo Mask Zoom ScrollNew
  • ASCII Dissolve ScrollNew
  • Lottie Flight ScrollNew
  • Inline Icon Text ScrollNew
  • Starfield ScrollNew
  • Name Swap ScrollNew
  • Spotlight Gallery HeroNew
  • Slit Rotate Hero ScrollNew
  • Stroke Cover ScrollNew
  • Stroke Rows ScrollNew
Text Animations
  • Text Skew Reveal
  • Block Text Reveal
Hover & Cursor
  • Image Trail Cursor
  • Cursor Depth Logo
  • Physics Tag Drop
  • Elastic Card ListNew
  • Magnetic Cards SpringNew
Sliders & Carousels
  • Wheel Fullscreen Carousel
  • Ripple Displacement Slider
  • Three.js Blend Slider
  • Stacked Deck Slider
  • Orbit Cylinder SliderNew
  • Fan Stack SliderNew
  • Exponential Strip SliderNew
  • Dual Column SliderNew
Galleries & Grids
  • Scroll Wave Gallery
Menus & Navigation
  • Shrink Page MenuNew
Preloaders & Intros
  • Floating Items RevealNew
  • Word Cycle RevealNew
  • Tile Grid LoaderNew
Page Transitions
  • Panel Assembly TransitionNew
3D & WebGL
  • Fractal Glass Hero
  • Fluid Cursor Canvas
  • Fluid Portrait Hero
  • Fluid Gradient Canvas
  • Inversion Lens HoverNew
UI Elements
  • Circular Widgets
  • Vinyl Cover
  • Image Explosion Footer
  • Accordion Image FramesNew

(Tween) — Motion registry

Animated components & full sites, one command away.

Product

  • Components
  • Templates
  • Installation
  • Guides
  • Blog
  • Contact

Categories

  • Scroll Animations
  • Text Animations
  • Hover & Cursor
  • Sliders & Carousels
  • Galleries & Grids
  • Menus & Navigation
  • Preloaders & Intros
  • Page Transitions
  • 3D & WebGL
  • UI Elements
TWEEN
ease: power2.inOut0.00s
© 2026 TweenBack to topBuilt by mohammad
  1. Docs/
  2. Components/
  3. Fluid Cursor Canvas

Fluid Cursor Canvas

PreviousNext

A real-time GPU fluid simulation that reacts to the cursor, rendered over a hero headline with a difference blend so the type inverts through the flow.

Open in
fluid-cursor-canvas-demo
Ondaline
casesstudiojournalbook a session

Motion Studio For

Brands In Flux

Never At Rest

components/ui/fluid-cursor-canvas-demo.tsx
import { FluidCursorCanvas } from "@/registry/tween/fluid-cursor-canvas"

export function FluidCursorCanvasDemo() {
  return <FluidCursorCanvas />
}

Installation

pnpm dlx shadcn@latest add https://tweenui.dev/r/fluid-cursor-canvas.json

Usage

import { FluidCursorCanvas } from "@/components/ui/fluid-cursor-canvas"
<FluidCursorCanvas
  logo="Ondaline"
  headline={["Motion Studio For", "Brands In Flux", "Never At Rest"]}
/>

A Three.js orthographic full-screen quad runs a Navier–Stokes style fluid solver across ping-pong render targets: curl and vorticity confinement, divergence, a Jacobi pressure solve, gradient subtraction, then velocity and dye advection. Cursor movement injects velocity and white dye "splats"; a display pass thresholds the dye into ink that's drawn over the hero with mix-blend-mode: difference, so the headline inverts wherever the fluid flows.

The renderer is sized from the host element and kept in sync with a ResizeObserver; pointer and touch listeners are bound to the component (never window) and mapped to local coordinates. WebGL context creation is wrapped in a guard, and on unmount every render target, material, geometry and the renderer are disposed and the animation loop cancelled. When prefers-reduced-motion: reduce is set, the simulation never starts and the static hero is shown.

Props

PropTypeDefaultDescription
logostring"Ondaline"Brand text in the nav, next to a wave mark.
navLinks{ label, href }[]4 defaultsNav links.
headline[node, node, node]3 defaultsThree headline lines (staggered alignment).
backgroundstring"#ffffff"Hero background color.
foregroundstring"#000000"Hero text color.
inkColorstring"#ffffff"Fluid ink color (blended with difference).
curlnumber50Vorticity confinement strength.
forceStrengthnumber8.5How hard pointer motion pushes the fluid.
splatRadiusnumber0.3Radius of each injected dye splat.
classNamestring—Extra classes on the outer container.
Fractal Glass HeroFluid Portrait Hero

On This Page

InstallationUsageProps

Contribute

  • Report an issue
  • Request a feature
  • Edit this page