Skip to Content
Prisma UI - React component library
ComponentsComponentsShine Border Card

Shine Border

An animated shining radial-gradient border effect. Inspired by Magic UI’s Shine Border . Implemented with pure CSS — no external animation library required.

Installation

npx shadcn@latest add https://prismaui.com/components/shine-border.json

Import

import { ShineBorder } from '@/components/ui/shine-border'; import { Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter, } from '@/components/ui/card';

Preview

Shine Border

A radial gradient sweeps continuously around the border.

Drop <ShineBorder /> inside any Card with relative.

<Card className='relative w-85'> <ShineBorder shineColor='#9c40ff' /> <CardHeader> <CardTitle>Shine Border</CardTitle> <CardDescription> A radial gradient sweeps continuously around the border. </CardDescription> </CardHeader> <CardContent> <p className='text-sm text-muted-foreground'> Drop &lt;ShineBorder /&gt; inside any Card with relative. </p> </CardContent> <CardFooter> <Button size='sm'>Action</Button> </CardFooter> </Card>

Multi-color Shine

Pass an array of colors to shineColor to create a rainbow-like shine effect.

Multi-color Shine
Array of colors with a thicker border.

Multiple colors blend into the radial gradient sweep.

<Card className='relative'> <ShineBorder shineColor={['#ffaa40', '#9c40ff', '#00d2ff']} borderWidth={2} /> ... </Card>

Slow Duration

Slow Shine
Longer duration for a subtle effect.

Increase duration for a slower, more ambient glow.

<Card className='relative'> <ShineBorder shineColor='#00d2ff' duration={30} /> ... </Card>

Props

PropTypeDefaultDescription
borderWidthnumber1Width of the shining border in pixels
durationnumber14Duration of the shine animation in seconds
shineColorstring | string[]#000000Color(s) for the shine gradient
Last updated on