StealThis .dev

Animated Shiny Text

Text with a shining shimmer highlight that sweeps across periodically using an animated linear gradient.

Open in Lab
css javascript vue svelte
Targets: TS JS HTML React Vue Svelte

Code

Animated Shiny Text

A text effect where a bright shimmer highlight sweeps across the text periodically, creating a polished, premium feel.

How it works

  1. A linear gradient with a narrow bright band is applied to the text via background-clip: text
  2. The gradient is oversized (background-size: 200%) so the shine band starts off-screen
  3. A CSS @keyframes animation moves background-position to slide the bright band across the text
  4. The animation uses a pause via timing — the sweep happens once then holds before repeating

Customization

  • --shine-color controls the highlight color (default: white)
  • --shine-speed controls the sweep duration (default: 3s)
  • --shine-width controls how wide the bright band is

When to use it

  • Premium brand text or luxury product names
  • Badge labels like “NEW” or “PRO”
  • Any heading that benefits from subtle motion