Shine Border
Drift a soft sheen along an element's border to give it quiet emphasis.
shine-border-demo
Overview
Shine Border paints a slow, soft sheen that drifts around its parent's border. It suits a recommended pricing plan, a featured card, or a sign-in panel where a static border feels flat but a travelling beam would feel too busy. By default the sheen uses tints of the foreground color, so it works in light and dark themes without extra configuration.
Installation
Usage
import { ShineBorder } from "@/components/animated/shine-border"
<div className="relative rounded-xl border p-5">
Pro plan
<ShineBorder colors={["#a1a1aa", "#e4e4e7"]} />
</div>Place it inside a relative element. It inherits the parent's border radius and draws over the existing border, so keep the parent's border subtle.
Accessibility
The sheen is decorative and hidden from assistive technology. Do not rely on it to signal state or selection. When reduced motion is requested, it stops and holds a still highlight.