Loading
Loading
Loading
mobile footer

Build the Interaction Layer Your Website is Missing.

Browse All EffectsBrowse All EffectsBrowse All EffectsUpgrade to ProUpgrade to ProUpgrade to Pro

70+ effects free, forever. No credit card.

© 2026 Hyperiux. All Rights Reserved.

AI Component CatalogueHey AI, Learn About Us
Platform

Vault

  • Documentation
  • Pricing
  • Blog
  • Community
  • NPM
  • MCP

Categories

  • All Effects
  • WebGL
  • Text
  • Backgrounds
  • Buttons
  • Carousels
  • Scroll
  • Components
  • Navigation
  • Cursor
  • Transitions
  • Loaders

Documents

  • Introduction
  • Installation
  • CLI
  • Dependencies
  • License

Legal

  • License Agreement
  • Terms of Service
  • Privacy Policy
  • Refund Policy
Socials
  • Twitter / X
  • LinkedIn
  • GitHub
  • Instagram
Contact Us
  • hello@hyperiux.com
New effects, in your inbox

Every new drop, plus the occasional behind-the-scenes build. No spam. Unsubscribe anytime.

All Effects
Featured ComponentsText AnimationsAnimated BackgroundsAnimated ButtonsCarousel EffectsScroll EffectsCreative ComponentsNavigationsCursor EffectsTransitionsLoadersWebGL & 3D Effects
Templates
IntroductionInstallationCLIDependenciesLicense
PricingBlogGithubNPMMCP Doc
Loading
Home/effects/Variable Text Proximity

Variable Text Proximity

A cursor-reactive text animation for hero copy, editorial statements, portfolio intros, and technical landing pages where typography should feel responsive without losing readability.

Motion
DemoDemoDemo

Tune the Real Props

Text Color

Text color.

Overview

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.


Usage Code

page
1import VariableTextProximity from "@/components/effects/variable-text-proximity";2 3const page = () => {4 return (5 <>6 <VariableTextProximity/>7 </>8 )9}10 11 12export default page

Example Production Use Case

A 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.


Best Used For

  • Hero statements where the copy should feel responsive to the visitor’s attention.
  • Creative portfolio intros where typographic interaction is part of the brand signal.
  • Developer-tool, AI, and technical pages where proximity behavior supports a precise interface mood.
  • Editorial sections where one short paragraph can carry a tactile interaction.
  • Brand manifestos where the words need subtle motion without becoming unreadable.

Not For

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.


Performance Budget

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.


Accessibility and Mobile

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.


Common Mistakes

  • Splitting every character without preserving accessible text.
  • Using the effect on long paragraphs where reading speed matters.
  • Updating layout-heavy state on every pointer move.
  • Choosing a font that does not support the intended variable axis.
  • Making letters change so dramatically that the sentence becomes harder to read.
  • Forgetting that touch users do not have cursor proximity.

Changelog

Initial release

API Reference

PropTypeDefaultDescription
radiusnumber100Pointer influence radius.
falloffstringlinearHow quickly the font variation fades with distance.
baseWeightnumber300Font weight away from the pointer.
hoverWeightnumber800Font weight nearest the pointer.
textColorstring#ffffffText color.
fontSizenumber55Paragraph font size in pixels.
lineHeightnumber1.18Paragraph line height.
widthnumber80Paragraph width as a percentage of its container.
italicbooleanfalseSlant nearby letters toward italic on pointer proximity.

Questions, Answered.

What is Variable Text Proximity?

Variable Text Proximity is a React text animation where letters respond to cursor distance, by changing variable-font weight and slant.

When should I use Variable Text Proximity?

Use it for short hero copy, editorial statements, portfolio intros, technical brand lines, and interactive typography moments where the text should react to attention.

Does Variable Text Proximity require a variable font?

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.

Is Variable Text Proximity good for paragraphs?

Only short display paragraphs. It is not meant for long reading, documentation, policy copy, or dense product explanations.

How do I keep Variable Text Proximity accessible?

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.

How should it behave on mobile?

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.

View MoreView More

Request a Custom Animation

Need a custom effect? Tell us what to create.

Related Effects

Explore All EffectsExplore All EffectsExplore All Effects
Blur Text
Pro
Motion

Blur Text

Text

Text Convergence
GSAP

Text Convergence

Scroll

Text Hover Expand
Pro
GSAP

Text Hover Expand

Text

Text Stream
Pro
GSAP

Text Stream

Text