Skip to content
Textlab
1
Browse

ComponentsDistort

Gooey text

Words melt into each other.

Melt, Merge, Morph, Mend

Installation

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

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

Usage

usage.tsx
import { GooeyText } from "@/components/textlab/gooey-text/gooey-text";

<GooeyText words={["Melt", "Merge", "Morph"]} />

Variants

blobdrip

Props

PropTypeDefaultDescription
words*string[]–Words to melt between.
variant"blob" | "drip""blob"Melt in place, or let the old word drip away.
intervalnumber2.2Seconds each word holds.
durationnumber1.2Seconds the melt takes.
goonumber12Stickiness, 4 to 20. Higher merges letters more.
labelstring–What screen readers hear. Defaults to every word.
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

  • Playful brands and creative portfolios.
  • Bold display words with simple shapes.

Skip it

  • Thin or small type; the threshold eats fine strokes.
  • Long words that change length a lot.

Accessibility and motion

Accessibility

  • Screen readers hear all words once.
  • The longest word reserves the space, so layout never shifts.

Motion

  • Enter uses the enter ease; the leaving word uses the exit curve so they cross in the middle.
  • The filter's alpha threshold turns the blur into liquid edges.
Reduced motion. Shows the first word, still.

Performance

  • One SVG filter on the word. Blur and threshold are GPU-friendly in most browsers; avoid dozens on one page.