
Blur Text
Text
A cursor-reactive text animation for hero copy, editorial statements, portfolio intros, and technical landing pages where typography should feel responsive without losing readability.
Variable Text Proximity turns a paragraph into a responsive typographic surface.
Each character reacts to its distance from the pointer. Letters closest to the cursor gain visual weight first, nearby glyphs respond with softer intensity, and the full line settles back when the pointer moves away. The effect makes the text feel alive without changing the words, breaking the sentence, or turning the paragraph into a decorative canvas.
Use Variable Text Proximity when the page needs a subtle interaction layer around important copy. It works for short hero statements, creative portfolio intros, technical brand lines, studio manifestos, experimental editorial blocks, and product pages where the typography should reward exploration.
The page job is tactile reading. The visitor should still read the message normally, but the text should feel like it knows where attention is moving. The interaction is not there to hide the copy. It is there to make the copy feel closer.
import VariableTextProximity from "@/components/effects/variable-text-proximity"; const page = () => { return ( <> <VariableTextProximity/> </> )} export default pageA creative studio homepage can use Variable Text Proximity on a short manifesto line. As the visitor moves across the copy, the nearest words gain weight and settle back, making the statement feel physically responsive.
The outcome is attention with touch. The visitor experiences craft at the typography level without losing the sentence, the CTA, or the page structure.
A developer-tool or AI product page can use the same effect for a short technical claim, especially when the brand wants the interface to feel precise, reactive, and engineered rather than simply animated.
Not for long body copy, documentation, legal text, pricing details, error messages, form labels, instructions, or dense educational content.
Not for mobile-first pages where pointer proximity cannot be reproduced meaningfully.
Not for weak copy. Variable text can make a sentence feel alive; it cannot make a vague sentence worth reading.
Keep the text block short, throttle pointer work with requestAnimationFrame, avoid React state updates for every character on every pointer event, and clean up listeners on unmount. Cache character positions and recalculate only when layout changes.
Avoid applying proximity calculations to long paragraphs or multiple large text blocks in the same viewport. Every letter does not need its own gym membership.
Expose the full sentence once as readable text. Do not make screen readers read every individually wrapped character. Maintain text selection, contrast, focus visibility, and normal reading order.
On touch devices, use a static final text state, a tap-safe simplified interaction, or disable proximity behavior entirely. Under reduced motion the weight still follows the pointer, only without the smoothing.
| Prop | Type | Default | Description |
|---|---|---|---|
radius | number | 100 | Pointer influence radius. |
falloff | string | linear | How quickly the font variation fades with distance. |
baseWeight | number | 300 | Font weight away from the pointer. |
hoverWeight | number | 800 | Font weight nearest the pointer. |
textColor | string | #ffffff | Text color. |
fontSize | number | 55 | Paragraph font size in pixels. |
lineHeight | number | 1.18 | Paragraph line height. |
width | number | 80 | Paragraph width as a percentage of its container. |
italic | boolean | false | Slant nearby letters toward italic on pointer proximity. |
Variable Text Proximity is a React text animation where letters respond to cursor distance, by changing variable-font weight and slant.
Use it for short hero copy, editorial statements, portfolio intros, technical brand lines, and interactive typography moments where the text should react to attention.
Yes. It ships with Roboto Flex loaded through next/font and interpolates the 'wght' axis (baseWeight 300 to hoverWeight 800 by default) plus 'slnt' when italic is on, so a replacement font needs the same variable axes.
Only short display paragraphs. It is not meant for long reading, documentation, policy copy, or dense product explanations.
Keep the complete phrase available as readable text and expose it once to assistive technology. If characters are individually wrapped for animation, hide decorative duplicates or provide a clean accessible label.
The component has no separate mobile mode. On touch screens, dragging a finger across the page drives the same weight shift, because it listens to touchmove as well as mousemove.
Need a custom effect? Tell us what to create.