Components / Cards
Border Beam Card
A card with a beam of light endlessly travelling around its border.
Pro plan
$19/month
A beam of light circles the border to draw the eye.
Installation
Requires React 18+ and Tailwind CSS.
- 1
Install dependencies
$ npm install motion - 2
Add the component
Copy the code from the Code tab above into
components/ui/border-beam-card.tsx. - 3
Use it
example.tsximport { BorderBeamCard } from "@/components/ui/border-beam-card"; export default function BorderBeamCardDemo() { return ( <BorderBeamCard className="w-full max-w-sm"> <p className="text-sm font-medium text-orange-600 dark:text-orange-300">Pro plan</p> <p className="mt-2 text-3xl font-semibold text-zinc-900 dark:text-white"> $19<span className="text-base font-normal text-zinc-500">/month</span> </p> <p className="mt-2 text-sm text-zinc-600 dark:text-zinc-400">A beam of light circles the border to draw the eye.</p> </BorderBeamCard> ); }
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| colorFrom | string | "#fb923c" | Leading color of the beam. |
| colorTo | string | "#e11d48" | Trailing color of the beam. |
| duration | number | 4 | Seconds for one lap around the card. |