Skip to content
Textlab
1
Browse

ComponentsDistort

Liquid text

Ripples run through the letters under the cursor.

Still water

Installation

$ npx shadcn@latest add @textlab/liquid-text

Needs @textlab in your components.json. Setup takes a minute.

Usage

usage.tsx
import { LiquidText } from "@/components/textlab/liquid-text/liquid-text";

<LiquidText as="h2" text="Still water" variant="still" />

Variants

ripplewavestill

Props

PropTypeDefaultDescription
text*string–The copy.
variant"ripple" | "wave" | "still""ripple"Stir under the pointer, keep a slow current running, or stay calm until touched.
strengthnumber14Displacement in px at full stir.
radiusnumber1.6Radius of the stirred area in em.
asElementType"span"Rendered element.
reducedMotion"user" | "always" | "never""user"user follows the OS setting; always shows the still version.
classNamestring–Merged onto the root.

When to use it

Reach for it

  • Water, wellness and audio brands.
  • Large display words people will hover.

Skip it

  • Text that must be read while the pointer is over it.
  • Small sizes; the ripple scale is in pixels.

Accessibility and motion

Accessibility

  • Only a decorative copy is distorted; screen readers read the text once.
  • Outside the pointer's circle the text is untouched.

Motion

  • The current drifts slowly on two sine waves so it never loops visibly.
  • Stir fades in and out with the pointer instead of switching.
Reduced motion. Plain, still text.

Performance

  • One SVG turbulence filter. The loop pauses offscreen and when the tab is hidden.