Shine Border

PreviousNext

Renders an animated neon gradient border around any child content. The border is drawn using a masked overlay with CSS animations — no Tailwind or external CSS required. Supports customization of radius, width, speed, and colors.

shine-border-default

Installation

pnpm dlx shadcn@latest add https://ui.dalim.in/r/styles/default/shine-border.json

Usage

import { ShineBorder } from "@/components/ui/shine-border"
<div className="relative h-screen w-full overflow-hidden">
  <ShineBorder borderRadius={12} borderWidth={3} duration={10}>
    <span style={{ color: "white", fontSize: 20 }}>Neon Glow ✨</span>
  </ShineBorder>
</div>

API Reference

PropTypeDefaultDescription
borderRadiusnumber8Corner radius of the bordered container, in pixels.
borderWidthnumber1Thickness of the border, in pixels.
durationnumber14Duration of one full shine animation cycle (in seconds).
colorstring | string[]Neon palette (["#ff00ff", "#00ffff", "#ff3131", "#00ff00", "#ffea00", "#ff6ec7", "#39ff14", "#ff8300", "#7df9ff", "#fe019a"])Single CSS color string or array of colors used for the animated border.
classNamestringOptional CSS class for wrapper.
childrenReact.ReactNodeContent inside the bordered container.