Skip to content
Textlab
1
Browse

ComponentsPhysics

Jelly text

Letters wobble like jelly when touched.

Squishy

Installation

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

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

Usage

usage.tsx
import { JellyText } from "@/components/textlab/jelly-text/jelly-text";

<JellyText as="h2" text="Squishy" />

Variants

squashwobble

Props

PropTypeDefaultDescription
text*string–The copy.
variant"squash" | "wobble""squash"Squish flat and spring tall, or rock side to side.
strengthnumber1How hard a touch kicks the letter.
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, games and empty states.
  • Words that invite poking, on mouse or touch.

Skip it

  • Interactive controls; letters are not buttons.
  • Body text.

Accessibility and motion

Accessibility

  • Letters are aria-hidden; the word is read once.
  • Works with touch through pointer down.

Motion

  • Underdamped springs ring out over about a second.
  • Neighbours get a smaller kick so the wobble spreads.
Reduced motion. Touch does nothing; plain text.

Performance

  • The frame loop runs only while a spring is moving.