Skip to content

No.414 · Text Animations· New

Spotlight Text

Muted letters with a pool of colour that follows the pointer through them. When the pointer is away, the pool drifts on its own along a slow path.

The prompt

Copy this text

Automatic copying is unavailable. Copy the selected text using your device’s copy command.

Written for the variant you picked above: Light

Build a component that fills text with colour, in one effect, that works inline (one word in a sentence) or as a whole headline. Use background-clip: text on transparent text, with box-decoration-break: clone so the fill carries across line breaks; keep it real text (selectable, with a readable selection colour). In forced-colours mode drop the fill and use CanvasText. Palette (light / dark): teal #0e9f8f / #2dd4bf, blue #2563eb / #60a5fa, violet #7c3aed / #a78bfa, pink #db2777 / #f472b6, orange #ea580c / #fb923c. Light stops are deep enough for large text on a near-white page; dark stops are brighter. The letters rest in a muted grey that still passes 3:1 for large text (#85888f / #5f636b). The effect: a radial pool of colour (pink at the centre, then violet, blue and teal, fading out by 38%) sits at --x/--y over the muted letters. The pointer sets them as percentages of the text box; when it leaves (or on touch), the pool drifts on its own along a slow Lissajous path (sin 0.45 and 0.7 rad/s), paused offscreen. The whole headline carries the effect: 'Colour where you are looking.' Show it in a two-line headline (Inter about 84px, 650, -0.04em, 1.02 leading) under a small uppercase eyebrow and in one inline phrase of a paragraph, on a #fbfbfa / #08090b page. Selected variant — Light (light): Palette for this theme (Light): --sptx-a #0e9f8f; --sptx-b #2563eb; --sptx-c #7c3aed; --sptx-d #db2777; --sptx-muted #85888f. Treat these as the root colour tokens, one value per role, and name them to suit your code. Select it with the theme option set to "light". Keep every dimension, spacing value, state and motion from the brief unchanged, and keep text at 4.5:1 contrast or better on these surfaces. This selection takes precedence over references to other themes or options in the general brief. Implement this selected appearance; do not add a variant picker or alternative appearances unless requested. Implementation requirements: Use React and TypeScript. Keep the component self-contained, with uniquely scoped CSS and no animation libraries. Include required imports, styles and font setup in the result. Interaction: Move the pointer across the text and the colour follows it; text stays selectable. Motion: The pool follows the pointer instantly and drifts slowly when idle. Reduced motion or motion={false} leaves it still at the centre. Accessibility: It's ordinary text, so screen readers read it normally; the muted letters keep large-text contrast; forced-colours mode falls back to the system text colour. Responsive behavior: Sizes come from the container width; the fill follows the text across line breaks. Touch: Touch shows the slow drift; nothing depends on a pointer. Preserve keyboard access, visible focus and reduced-motion behavior. Keep fictional demo data and simulated service calls in a separate usage example; expose callbacks for real actions and recover from rejected requests. Keep usage-example links inside the demo: use local buttons or prevent navigation. Demonstration links must not navigate to Vitrine routes or open other pages; preserve real URL support in the reusable component itself. Verify the result at narrow and wide viewport sizes, with keyboard input and reduced motion enabled.

Notes

Interaction
Move the pointer across the text and the colour follows it; text stays selectable.
Motion
The pool follows the pointer instantly and drifts slowly when idle. Reduced motion or motion={false} leaves it still at the centre.
Accessibility
It's ordinary text, so screen readers read it normally; the muted letters keep large-text contrast; forced-colours mode falls back to the system text colour.
Responsive
Sizes come from the container width; the fill follows the text across line breaks.
On touch
Touch shows the slow drift; nothing depends on a pointer.

Featured

425 components