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/Spotlight Text

Spotlight Text

A cursor-following spotlight text effect that brightens the words under the pointer in a short paragraph, for statements, mission lines, and dark landing-page sections.

Vanilla JS
DemoDemoDemo

Tune the Real Props

Base Text Color

Dim base text color.

Spotlight Color

Text color inside the spotlight.

Overview

Spotlight Text renders a paragraph in a muted base colour and lays an identical copy in the spotlight colour on top, masked by a radial gradient that follows the cursor. Wherever the pointer moves, the words underneath brighten, and the spotlight fades out when the pointer leaves.

Best on a short, high-emphasis statement: a mission line, a manifesto paragraph, a section opener. The copy is hard-coded in the component, so edit the source to change it; props cover size, alignment, colours, spotlight radius and smoothing. Avoid it on body copy, errors, legal text, or instructions, where legibility cannot be negotiable.

The thing to watch is the duplicate copy. On desktop both paragraphs are real HTML text and the spotlight layer is not marked aria-hidden, so screen readers may read the statement twice; add aria-hidden to the overlay in your copy of the source if that matters. With reduced motion the cursor spotlight stays on and simply tracks the pointer without smoothing.


Usage Code

page
1import SpotlightText from "@/components/effects/spotlight-text";2 3const page = () => {4  return (5    <>6      <div className="h-screen flex flex-col items-center mx-auto justify-center gap-25 bg-black">7     <SpotlightText8          size="text-3xl"9          className="max-w-4xl mx-auto max-sm:w-[80%] max-md:w-[90%]"10        />11      </div>12    </>13  );14};15 16export default page;

Example Production Use Case

A sustainability report microsite can use Spotlight Text on a short impact statement near the top of the page. The sentence starts in a muted tone, and a soft highlight follows the visitor's cursor, brightening the words underneath as they read across the claim.

The outcome is focus. On touch devices and smaller screens the full sentence shows in the highlight colour instead, so the statement never depends on hover to be read. Detailed figures and methodology sit below as ordinary text.


Best Used For

  • Short statements or manifesto lines that visitors can explore with the cursor.
  • Text moments where the highlight supports attention without hiding the sentence.
  • Spotlight Text keeps the full paragraph readable in its muted colour while the spotlight adds a hover-led moment on desktop.

Not For

Avoid it on body copy, labels, error and legal text, or any wording that has to be read on sight.


Performance Budget

Nothing is split or re-laid out: the spotlight is a CSS radial-gradient mask positioned by custom properties updated in a requestAnimationFrame loop, which pauses when the text is offscreen or the tab is hidden. Keep the paragraph short, since the overlay duplicates every word.


Accessibility and Mobile

The text is never split into characters, but on desktop the paragraph exists twice (the muted base and the spotlight copy), and the copy is not aria-hidden, so assistive technology may hear it twice. Below 1025px or on touch devices only one paragraph renders, in the spotlight colour.


Common Mistakes

  • Using Spotlight Text on long body copy.
  • Removing the readable text from the DOM.
  • Forgetting that the desktop spotlight copy duplicates the paragraph for screen readers.

Changelog

Removed text and width-style content controls and added working base color, spotlight color, lerp, spotlight size, and smoothness controls.
Initial release

API Reference

PropTypeDefaultDescription
baseTextColorstring#525252Dim base text color.
spotlightColorstring#ffffffText color inside the spotlight.
lerpnumber0.08Pointer-follow smoothing amount; higher values track faster.
spotlightSizenumber220Spotlight radius in pixels.
smoothnessnumber0.12Spotlight opacity smoothing amount.

Questions, Answered.

When should I use Spotlight Text?

Use it when a short statement should invite the visitor to explore it with the cursor, with the words under the pointer lighting up.

How do I keep Spotlight Text accessible?

The full text is real HTML, but on desktop the spotlight layer is a second copy of the paragraph that is not aria-hidden, so screen readers may announce it twice. If that matters, add aria-hidden="true" to the overlay paragraph in your copy of the source.

Does Spotlight Text affect SEO?

The text is genuine HTML rendered with the page, so it is indexable. On desktop the same paragraph appears twice in the DOM, once muted and once as the spotlight layer.

How do I avoid layout shift with Spotlight Text?

There is little to manage: the text is never split or animated in, and the spotlight copy is absolutely positioned over the base paragraph, so it takes no extra space. Check wrapping at the 7vw font size the component applies below 768px.

What should reduced motion do for Spotlight Text?

With reduced motion, the spotlight still follows the cursor on desktop, but it snaps to the pointer and fades in and out instantly instead of easing. On touch devices and screens under 1025px the whole sentence is shown in the highlight colour with no spotlight.

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

Circle Text Reveal
Pro
Motion

Circle Text Reveal

Text

Glitchy Text
Pro
GSAP

Glitchy Text

Text

Mask Text Reveal
Pro
GSAP

Mask Text Reveal

Text