Command Palette

Search for a command to run...

0GitHub stars
Components

Liquid Morph Text

Interactive liquid metaball typography with cursor-reactive inflation, fluid spline wake, and SVG gooey filter physics.

Loading…
Dependencies (1)

Features

  • Cursor-reactive liquid metaball inflation driven by a critically damped 2nd-order spring and a 5-node fluid spline wake.
  • Dual-canvas rendering pairs crisp high-DPI typography with an SVG gooey filter (feGaussianBlur + feColorMatrix) that sleeps when idle.
  • Automatic "auto", "light", and "dark" theme synchronization with live font-load re-sampling.

Use cases

  • Hero section display typography and interactive wordmarks.
  • Playful landing page headlines and creative studio branding.

Installation

pnpm dlx shadcn@latest add @abushaidislam/liquid-morph-text

Usage

import { LiquidMorphText } from "@/components/liquid-morph-text"
<LiquidMorphText
  text="morph"
  fontSize={136}
  radius={95}
  intensity={1}
  italic
  theme="auto"
/>

Adjust fontSize, radius, and intensity to tune the metaball inflation reach and gooey bridge strength.

Composition

The component layers an SVG-filtered metaball canvas over a crisp high-DPI base canvas:

LiquidMorphText
├── Screen Reader Label (sr-only)
├── SVG Filter (feGaussianBlur -> feColorMatrix -> feComposite)
└── Canvas Stage
    ├── Base Canvas (high-DPI typography)
    └── Gooey Overlay Canvas (Gaussian metaball sprites + filter)

API reference

LiquidMorphText

Prop

Type

Accessibility

  • Uses role="img" with aria-label and a visually hidden label, and triggers a liquid wave sweep when pressing Enter or Space.
  • With prefers-reduced-motion, the gooey overlay canvas and animation loop are disabled, leaving a static base render.

License and usage

  • Free to use and modify in both personal and commercial projects.
  • Attribution is appreciated but not required.
  • Released under the MIT License.

Was this helpful?

Command Palette

Search for a command to run...