Components
Border Beam
A beam of light that travels around an element's border.
ProPro, coming soon.
Team plan
Shared projects, roles and priority support.
<BorderBeam>
<Card />
</BorderBeam>Get notified
Border Beam is a Pro effect. Join the waitlist and we'll email you when it's available.
Usage
import { BorderBeam } from "@zjkm/border-beam";
export function PlanCard() {
return (
<BorderBeam radius={12}>
<div className="rounded-xl border p-6">Team plan</div>
</BorderBeam>
);
}Props
| Prop | Type | Default | Description |
|---|---|---|---|
children | ReactNode | The element the beam travels around. | |
duration | number | 6 | Seconds per lap. |
size | number | 80 | Length of the beam in pixels. |
colorFrom | string | "#7dd3fc" | Colour at the beam's head. |
colorTo | string | "#c084fc" | Colour at the beam's tail. |
borderWidth | number | 1.5 | Width of the beam's border line in pixels. |
radius | number | 12 | Corner radius in pixels. Match your element's border-radius. |
reverse | boolean | false | Travel counter-clockwise. |
className | string | Classes for the wrapper. |