RippleLine squiggly text, animated React component
Text that boils like a stop-motion pencil drawing: an SVG turbulence filter re-rolls its noise every few frames, and an optional hand-drawn underline draws itself in. Sweeping the pointer across it stirs the ink, which jumps with pointer speed and settles back on a spring.
- Free
- Motion Effects
- Hover
- Spring
Like RippleLine squiggly text? 256 more are in Pro.
Pro unlocks all 256 Pro components, every template and block, and everything we release next. RippleLine squiggly text stays free.
Play with it
Move the controls and watch it change. Copy code gives you a snippet with only the props you changed.
Props
| Prop | Type | Default | What it does |
|---|---|---|---|
| children | React.ReactNode | — | Content to boil. Takes priority over text. |
| text | string | — | Convenience text when no children are given. |
| steps | number | 5 | How many noise frames the boil cycles through. |
| stepDuration | number | 80 | Milliseconds each frame is held. |
| scale | number | readonly [number, number] | [6, 8] | Resting displacement in px; a pair alternates frame by frame. |
| baseFrequency | number | 0.02 | Noise frequency. Higher gives tighter wiggles. |
| numOctaves | number | 3 | Noise detail, 1 to 5. |
| stir | number | 0.06 | How hard pointer speed stirs the ink. 0 turns it off. |
| underline | boolean | false | Adds a hand-drawn squiggle underline that redraws when the pointer enters. |
| underlineColor | string | — | Underline colour. Defaults to the accent blue. |
| as | "span" | "div" | "span" | Root element of SquigglyText. |
| className | string | — | Classes for the root element. |
| textClassName | string | — | Classes for the boiling text node. |
| autoplay | boolean | false | Stirs the ink and redraws the underline every 2.8s until someone points at it. |
Add it to your project
- 1
Set up your project once
You need a Next.js project with Tailwind CSS and the
@/import alias. In its root folder, run this once. It createscomponents.jsonand thecn()helper insrc/lib/utils.ts:npx shadcn@latest init -d
Starting from nothing? The Quick Start walks through the whole thing.
- 2
Connect the registry
Run this once per project. It writes the Nexus UI entry into
components.jsonfor you:npx shadcn@latest registry add "@nexus-labs=https://www.nexus-ui.com/api/registry/{name}"Type it exactly as shown.
{name}is filled in by the CLI with the component you ask for, so you never replace it.
- 3
Add the component
Run this from your project root. It adds the component, the helpers it imports and its npm packages.
npx shadcn@latest add @nexus-labs/squiggly-text
- 4
Check what was added
With a project made as in the Quick Start (a
src/folder), these files land in it:components/squiggly-text.tsxsquiggly-text/index.tssquiggly-text.tsx - 5
Copying by hand? Skip the registry
Instead of steps 2 and 3 you can copy the files yourself, with no registry and no API key. Step 1 still applies, so that
cn()exists. Install the packages:npm install framer-motion
Then show the source and create each file at the path it gives:
- 6
Use it in a page
Installing only adds the files. Import the component in a page and render it. The Usage tab on the preview shows a fuller example with props:
// src/app/page.tsx import { SquigglyText, SquigglyWord } from "@/components/squiggly-text"; export default function Page() { return ( <main> <SquigglyText /> </main> ); }
Like RippleLine squiggly text? 256 more are in Pro.
Pro unlocks all 256 Pro components, every template and block, and everything we release next. RippleLine squiggly text stays free.
About RippleLine squiggly text
Squiggly Text adds an animated SVG underline that ripples continuously beneath highlighted words. The SVG path is drawn relative to the text element's bounding box and animates with a horizontal ripple motion using Framer Motion. The component adapts to any font size and text length automatically. Use it in hero headings or feature callouts to draw visual attention to a keyword without disrupting the overall typographic layout.
Good for
- Hero heading keyword emphasis
- Feature and benefit callout text
- Landing page promotional headlines
- Marketing copy emphasis effects
RippleLine squiggly text questions
How do I install squiggly text?
Run `npx shadcn@latest add @nexus-labs/squiggly-text`. It adds SquigglyText and SquigglyWord and installs framer-motion, which is used only to detect reduced motion.
How is the wobble made?
The component builds several SVG filters (`feTurbulence` + `feDisplacementMap`) with different seeds and switches between them every `stepDuration` ms. That gives a jittery hand-drawn look with no canvas.
Which props control the effect?
`steps` (5) is the number of frames, `stepDuration` (80 ms) the time per frame, `scale` ([6, 8]) the distortion strength, and `baseFrequency` (0.02) and `numOctaves` (3) the noise. Use `SquigglyWord` to wobble only some words inside a heading.
Does it respect reduced motion?
Yes. With prefers-reduced-motion on, it stops cycling and holds a single still frame.