Skip to content

UI Library for Design Engineers. Animated components and effects you can copy and paste into your apps. Free. Open Source.

1.6 KB
Raw Blame
---
title: Kinetic Text
date: 2026-04-20
description: A text component that animates font weight of characters on hover.
author: abdmjd1
published: true
---

<ComponentPreview name="kinetic-text-demo" />

## Installation

<Tabs defaultValue="cli">

<TabsList>
  <TabsTrigger value="cli">CLI</TabsTrigger>
  <TabsTrigger value="manual">Manual</TabsTrigger>
</TabsList>
<TabsContent value="cli">

```bash
npx shadcn@latest add @magicui/kinetic-text
```

</TabsContent>

<TabsContent value="manual">

<Steps>

<Step>Copy and paste the following code into your project.</Step>

<ComponentSource name="kinetic-text" />

<Step>Update the import paths to match your project setup.</Step>

</Steps>

</TabsContent>

</Tabs>

## Usage

```tsx showLineNumbers
import { KineticText } from "@/components/ui/kinetic-text"
```

```tsx showLineNumbers
<KineticText text="some text" />
```

## Props

| Prop        | Type                                                            | Default | Description                                         |
| ----------- | --------------------------------------------------------------- | ------- | --------------------------------------------------- |
| `text`      | `string`                                                        | `-`     | The text content to render with the kinetic effect. |
| `as`        | `"h1" \| "h2" \| "h3" \| "h4" \| "h5" \| "h6" \| "p" \| "span"` | `"h1"`  | The HTML element to render as.                      |
| `className` | `string`                                                        | `-`     | Additional class names for the wrapper element.     |

## Credits

- Credit to [@abdmjd1](https://github.com/abdmjd1)