StealThis .dev

Shine Border

Container with a glowing, shining animated border using a rotating gradient that creates a polished metallic edge effect.

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

Code

Shine Border

A container with a glowing, shining animated border created by a rotating linear gradient behind the content. The gradient rotation gives the illusion of light sweeping around the border.

How it works

  1. A pseudo-element with a linear gradient rotates behind the card
  2. The content layer sits on top with a solid background
  3. The gap between the rotating gradient and the content edge creates the “shining border”
  4. CSS @keyframes handle the continuous rotation

Customization

  • Change shine colors with --shine-color-1 and --shine-color-2
  • Adjust border thickness with --shine-border-width
  • Control speed with --shine-speed

When to use it

  • Highlighted feature cards
  • Premium or “pro” tier UI elements
  • Call-to-action containers