Baktiyar Ablaikhan

Squiggly Text

Source
Aceternity UI ↗
Author
Aceternity UI
Licence
Aceternity UI licence (free component)

Loading…

Words wobble like hand-drawn animation by cycling SVG turbulence filters.

Code

"use client";
import React from "react";
import { SquigglyText } from "@/lab/aceternity/ui/squiggly-text";

export default function SquigglyTextDemo() {
  return (
    <div className="@container relative flex h-full w-full items-center justify-center p-4">
      <h1 className="text-center text-[clamp(1.5rem,8cqw,6rem)] leading-tight font-bold text-neutral-900 dark:text-neutral-100">
        How many{" "}
        <SquigglyText stepDuration={70} scale={[6, 9]} className="text-amber-500">
          drinks
        </SquigglyText>{" "}
        <br />
        are <SquigglyText scale={5}>too many</SquigglyText> drinks?
      </h1>
    </div>
  );
}
Prompt

Build "Squiggly Text", a text animation. What it does: Words wobble like hand-drawn animation by cycling SVG turbulence filters. Write it as a single self-contained React component in TypeScript that fills its parent (w-full h-full), styled with Tailwind CSS, using motion. Technique: the Motion library, inline SVG. It sits on a light background, in a 16:10 frame. Respect prefers-reduced-motion with a still state, pause work when the element is off screen, and keep it accessible. Original: https://ui.aceternity.com/components/squiggly-text (Aceternity UI, Aceternity UI licence (free component)).