Liquid Cursor

A liquid glass cursor that follows the pointer, stretches with movement, and morphs into the shape of whatever interactive element it hovers, with real SVG refraction, spring physics, and reduced-motion support.

Liquid Cursor

Hover anything inside this stage

The droplet ignores the cursor outside its container.

data-liquid element

The cursor melts into this shape

Installation

  1. 1

    Install the component:

    npx shadcn@latest add https://ui.amines.fun/registry/liquid-cursor.json
  2. 2

    Usage:

    jsx

    app/layout.jsx

    import LiquidCursor from "@/registry/components/Cursors/Liquidcursor";export default function RootLayout({ children }) {  return (    <html lang="en">      <body>        {children}        <LiquidCursor />      </body>    </html>  );}

Props

PropTypeDefaultDescriptionRequired
sizenumber48Diameter of the free-floating droplet in pixels before it snaps to an element.No
targetsstring"a, button, [role='button'], summary, input, select, textarea, [data-liquid]"CSS selector for elements the droplet morphs into. Elements wider or taller than maxSnap are ignored.No
paddingnumber6Extra space in pixels added around a snapped element on every side.No
radiusnumber | "auto""auto"Corner radius in pixels when snapped to an element. auto reads the element's own border radius and adds padding.No
maxSnapnumber640Elements larger than this in either dimension (in pixels) are not snapped to; the droplet stays a free circle.No
magnetnumber0.12How strongly the droplet is pulled toward the center of a hovered element, from 0 (no pull) to 1 (locked to center).No
stretchnumber0.5Maximum directional stretch while moving, relative to speed. Set to 0 to disable stretching.No
refractionnumber18Strength of the SVG displacement refraction through the droplet's rim. Set to 0 for a plain blur.No
bezelnumber14Width in pixels of the refractive rim inside the displacement map.No
blurnumber2Backdrop blur amount in pixels applied through the droplet.No
saturationnumber1.5Backdrop saturation multiplier inside the droplet.No
tintstring"rgba(255,255,255,0.06)"CSS background/color layered inside the droplet.No
rimstring"rgba(255,255,255,0.4)"Color of the inner rim highlight ring.No
highlightnumber0.6Opacity of the specular highlight at the top of the droplet, from 0 to 1.No
shadowstring"0 8px 30px rgba(0,0,0,0.2)"CSS box-shadow applied to the droplet.No
follow{ stiffness?: number; damping?: number; mass?: number }{ stiffness: 260, damping: 22, mass: 0.7 }Spring transition used for the droplet following the pointer.No
morph{ stiffness?: number; damping?: number; mass?: number }{ stiffness: 320, damping: 30 }Spring transition used when morphing between the free droplet and element shapes.No
hideCursorbooleanfalseHide the native system cursor while the liquid cursor is active.No
zIndexnumber9999Z-index of the fixed cursor layer.No
classNamestring""Additional class names applied to the cursor element.No
containerReact.RefObject<HTMLElement> | HTMLElement | string | nullnullScope the cursor to an area: an element, a ref, or a CSS selector. The droplet only tracks the pointer inside it, hides outside, and snaps instantly to the pointer on re-entry. Null follows the pointer globally.No