# Hover Weight

> Letters grow heavier as the cursor nears them.

## Spec sheet

| | |
| --- | --- |
| Access | Free: no account, free for commercial use |
| Shelf | Text Animations › Interactive |
| Live preview | https://uibrik.com/components/hover-weight |
| Writes | 1 file into `components/uibrik/hover-weight/` |
| Packages | `motion` (the CLI installs them) |
| Needs | React 19, Tailwind CSS v4, a project set up with `npx shadcn@latest init` |
| Theme | Reads the shadcn tokens and follows class-based dark mode ([theming](https://uibrik.com/docs/theming.md)) |
| Updated | Nov 9, 2026 |

## Add it

```bash
npx shadcn@latest add https://uibrik.com/r/hover-weight.json
```

With the `@uibrik` namespace in `components.json` ([setup](https://uibrik.com/docs/installation.md)): `npx shadcn@latest add @uibrik/hover-weight`.

Can't run commands? https://uibrik.com/components/hover-weight/prompt.txt has every file verbatim, with the setup steps, ready for an assistant to write.

## Render it

Renders as is; every value shown is the default, so delete any line you don't need.

```tsx
import { HoverWeight } from "@/components/uibrik/hover-weight/hover-weight";

<HoverWeight
  play={0}
  text="Move closer"
  minWeight={400}
  maxWeight={700}
  radius={60}
  sweepDuration={0.9}
/>
```

## Tune it

The same props as the Customize panel on https://uibrik.com/components/hover-weight.

| Prop | Type | Default | What it does |
| --- | --- | --- | --- |
| `text` | `string` | `"Move closer"` | The copy to animate. |
| `minWeight` | `number` | `400` | Weight away from the pointer. |
| `maxWeight` | `number` | `700` | Weight right under the pointer. |
| `radius` | `number` | `60` | Reach of the pointer. |
| `sweepDuration` | `number` | `0.9` | Replay sweep across the line. |

## Wire it

The props the Customize panel doesn't show: ranges, data, content and callbacks.

| Prop | Type | Default | What it does |
| --- | --- | --- | --- |
| `play` (required) | `number` |  | Each change plays the effect again; 0 shows its resting state. |

## Where it fits

- **Interactive headlines**: Letters growing heavier as the cursor nears make a title respond to the visitor. Pairs with [Pull Toward Cursor](https://uibrik.com/components/pull-to-cursor.md).
- **Font showcases**: Variable weight under the pointer demonstrates a typeface's full range.
- **Portfolio intros**: A name that thickens under the cursor is a subtle, type-led interaction.

## Same shelf: Interactive

- [Lean and Scramble](https://uibrik.com/components/lean-scramble.md): Words lean and scramble under the cursor.
- [Pull Toward Cursor](https://uibrik.com/components/pull-to-cursor.md): Letters lean toward the cursor like a magnet.
- [Rust Text](https://uibrik.com/components/rust-text.md): Brushed steel type that rusts while you watch and flakes away, polished back to a shine wherever the pointer passes.
- [Draggable Letters](https://uibrik.com/components/draggable-letters.md): Letters you can pull apart; they spring home.

## Ground rules

- Only the props above exist. To change anything else, edit the installed file.
- Keep the files in `components/uibrik/hover-weight/` so the import paths keep resolving.
- The playbook for working with the whole library: https://uibrik.com/llms.txt
