Wobble

Big type that won't sit still. A WebGL2 shader bends your words like jelly, so letters swell, stretch and sway as a slow field rolls through them, while their edges stay crisp.

Wobble

Props
Color
theme
Weight800
Amount1.00
Scale1.00
Speed1.00

Installation

pnpm dlx shadcn@latest add @breeze/wobble

Usage

import { Wobble } from "@/components/breeze/wobble"

Give it a box; the lettering fits itself to the box's width and height, with a little room left around it for the warp.

<Wobble text="Wobble" as="h1" className="h-56 w-full" />

Use \n for more than one line:

<Wobble text={"Soft\nServe"} className="h-96 w-full" />

Props

PropTypeDefaultDescription
textstring"Wobble"The words; \n starts a new line
asstring"h2"The element that holds the real text, e.g. "h1" or "p"
colorstring"currentColor"Letter colour, any CSS colour or var()
weightnumber800Font weight (best with a variable font)
amountnumber1How strongly the letters warp, 0 to 2. 0 holds them still
scalenumber1Size of the waves. Bigger is broader and lazier
speednumber1Animation speed multiplier. 0 freezes the warp
interactivebooleantrueA soft bulge follows the pointer
fpsnumber60Frame rate cap
classNamestringSize it here; its font and tracking are used too

Your words are drawn once in your own font, then the shader bends the space they sit in. A few slow waves run through it in different directions, one set moving the type up and down and one side to side, so the baseline ripples, letters grow taller and shorter, and stems lean and sway. Each wave swells and fades on its own, so the motion never visibly loops. However far a letter is stretched, its edge is rebuilt one pixel wide, so it stays as sharp as text rather than smudging. It uses the font, weight and letter spacing of the element, so your font classes and tracking-* change the lettering too (with default spacing it tightens a touch, to -0.02em, to suit display type), and it's redrawn when your fonts load, the box resizes or the theme changes. The colour follows your text colour, so it's dark in light mode and light in dark mode, with a transparent background. The real text stays in the page for screen readers and search, and the plain text shows instead if WebGL2 isn't available or the browser drops the GPU context. Other props such as id, style, aria-* or data-* go on the element. It pauses off-screen and in background tabs, and shows a still frame with reduced motion.

Examples

Brand colour

Pass any CSS colour or theme token, here your primary colour.

Breeze

Slow and broad

Heat haze