Kinetic Text
- Source
- Magic UI ↗
- Author
- Magic UI
- Licence
- MIT
Loading…
Letters near the pointer swell in weight and spacing, falling off with distance.
Code
"use client";
import { KineticText } from "@/lab/magicui/ui/kinetic-text";
export default function KineticTextDemo() {
return (
<div className="@container relative flex h-full w-full items-center justify-center text-neutral-950">
<KineticText
text="Nostalgia"
className="text-[clamp(3rem,13cqw,6rem)] tracking-[-5%] [font-optical-sizing:auto]"
/>
</div>
);
}
Prompt
Build "Kinetic Text", a text animation. What it does: Letters near the pointer swell in weight and spacing, falling off with distance. Write it as a single self-contained React component in TypeScript that fills its parent (w-full h-full), styled with Tailwind CSS. 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://magicui.design/docs/components/kinetic-text (Magic UI, MIT).