StealThis .dev

Shiny Button

A button with a glossy reflection effect that glides across on hover, creating a polished premium feel.

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

Code

Shiny Button

A button that reveals a glossy light reflection on hover, sweeping diagonally across the surface for a premium, polished look.

How it works

  1. A ::before pseudo-element holds a bright diagonal linear gradient
  2. On the default state, it is positioned off the left edge of the button
  3. On :hover, it transitions to the right side, creating a sweeping shine
  4. overflow: hidden keeps the shine confined within the button boundaries

Customization

  • Shine intensity: Adjust the gradient’s white opacity values
  • Speed: Change the transition-duration on the pseudo-element
  • Angle: Modify the linear-gradient angle for different sweep directions

When to use it

  • Hero section CTAs
  • Pricing plan action buttons
  • Any button that should feel premium and interactive