Skip to content
Magic UI SolidMagicUI Solid

Kinetic Text

A text component that animates font weight of characters on hover.

Nostalgia

@/demos/KineticTextDemo.tsx
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>
)
}
Terminal window
pnpm dlx shadcn@latest add @magicui-solid/kinetic-text
import { 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.

Original:

magicui.design/docs/components/kinetic-text