Skip to content

    Browse components

    Ink Fluid

    Real-time fluid ink that swirls off the cursor in shifting colors. A compact WebGL2 stable-fluids solver, scoped to its container.

    Ink Fluid

    Open
    Customize

    Installation

    npx shadcn@latest add @glint-ui/ink-fluid

    First time using @glint-ui? Add the registry to components.json once, or install by URL: npx shadcn@latest add https://glintui.vercel.app/r/ink-fluid.json

    Usage

    import { InkFluid } from "@/components/ui/ink-fluid";
    
    <div className="relative h-96">
      <InkFluid />
    </div>

    Props

    PropTypeDefaultDescription
    simResolutionnumber128Velocity grid size on the shorter side. Higher is finer and slower.
    dyeResolutionnumber512Ink texture size on the shorter side.
    dissipationnumber0.8How quickly ink fades, per second.
    velocityDissipationnumber0.4How quickly motion settles, per second.
    curlnumber20How much the ink curls into swirls.
    splatRadiusnumber0.25Splat radius.
    forcenumber6000How hard cursor motion pushes the ink.
    idlebooleantrueThrow random splashes while the cursor is away.
    classNamestring—Extra classes for the root element.