Pressure Text, animated React component
- Pro
- Motion Effects
- Hover
- Spring
A headline that bulges where you hover: letters near the pointer swell taller and heavier on a variable font's weight axis and take the accent colour. Each letter has its own spring, so the swell falls away smoothly on either side.
Props
| Prop | Type | Default | What it does |
|---|---|---|---|
| text | string | "Feel every word" | The headline. Each character gets its own spring. |
| accent | string | "#0071e3" | Colour the letters take near the pointer. |
| hint | string | "Move along the word." | Caption under the headline. An empty string hides it. |
| spread | number | 0.18 | Share of the word's width a letter can be from the pointer and still swell. |
| autoplay | boolean | false | Sweeps a bulge back and forth along the word until someone hovers it. |
| className | string | — | Extra classes for the root element. |
Add it to your project
- 1
Set up your project once
You need a Next.js project with Tailwind CSS and the
@/import alias. In its root folder, run this once. It createscomponents.jsonand thecn()helper insrc/lib/utils.ts:npx shadcn@latest init -d
Starting from nothing? The Quick Start walks through the whole thing.
- 2
Connect the registry with your API key
Pressure Text is a Pro item, so the CLI has to send your API key. Do this once per project:
- Create a key at nexus-ui.com/dashboard/api-key. Copy it straight away: it starts with
nxs_and is shown only once. - In your project root, next to
package.json, create a file named.env.localwith this line, using your own key:NEXUS_API_KEY=nxs_your_key_here
- Open
components.jsonand add this entry inside the outermost braces, next to"aliases". Leave{name}and${NEXUS_API_KEY}exactly as written; the CLI fills them in:"registries": { "@nexus-labs": { "url": "https://www.nexus-ui.com/api/registry/{name}", "headers": { "Authorization": "Bearer ${NEXUS_API_KEY}" } } }
- Create a key at nexus-ui.com/dashboard/api-key. Copy it straight away: it starts with
How Pressure Text works
A headline that responds to pressure. Letters near the pointer swell taller and heavier and take the accent colour, falling away smoothly on either side, so the word bulges wherever you hover. With autoplay it breathes by itself until someone hovers it.
The source, the install command and the build prompt come with Pro.
Pressure Text questions
How do I install Pressure Text?
Run `npx shadcn@latest add @nexus-labs/pressure-text`. It installs framer-motion, and the effect is plain DOM with Framer Motion springs, no canvas. It is a Pro component, so it needs a Pro plan and an API key; key setup is on the CLI docs page (/docs/cli).
Does it need a variable font?
Yes, to see the weight change. Each letter's `font-variation-settings` `wght` axis moves between 250 and 900 as the pointer gets close, so the font needs a weight axis in that range. The component does not load a font itself, it uses whatever font the surrounding page sets.
How do I change the headline, colour and size of the bulge?
Set `text` (default "Feel every word"), `accent` (default `#0071e3`) for the color letters take near the pointer, and `spread` for the share of the word's width that swells (default about 0.18). `hint` sets the caption under it, and an empty string hides it.
How is it handled for screen readers and reduced motion?
The real text is in a visually hidden span and the per-letter copy is `aria-hidden`, so screen readers read the headline once. With prefers-reduced-motion on, the `autoplay` sweep does not run, though hovering still moves the bulge.

