Kinetic Text
A text component that animates font weight of characters on hover.
Nostalgia
import { KineticText } from '@/registry/magicui/kinetic-text'
export function KineticTextDemo() { return ( <div class="relative justify-center"> <KineticText text="Nostalgia" class="text-[6rem] tracking-[-5%] [font-optical-sizing:auto]" /> </div> )}Installation
Section titled “Installation”pnpm dlx shadcn@latest add @magicui-solid/kinetic-textbunx shadcn@latest add @magicui-solid/kinetic-textyarn dlx shadcn@latest add @magicui-solid/kinetic-textnpx shadcn@latest add @magicui-solid/kinetic-textimport { KineticText } from "@/components/magicui/kinetic-text"<KineticText text="some text" />| Prop | Type | Default | Description |
|---|---|---|---|
text |
string |
- |
The text content to render with the kinetic effect. |
as |
ValidComponent |
"h1" |
The HTML element to render as. |
class |
string |
- |
Additional class names for the wrapper element. |
Credits
Section titled “Credits”- Credit to @abdmjd1
Original:
magicui.design/docs/components/kinetic-text