Border Beam
A beam of light that travels around an element's border. Great for highlighting a card or signaling work in progress.
Motion
Sign in
Welcome back. Pick up where you left off.
Playground
Tweak the props, the preview and the code follow.
Your content
Props
80
6
1
import { BorderBeam } from "@/components/ui/border-beam"
<div className="relative rounded-2xl border">
Your content
<BorderBeam />
</div>Installation
npx @plumsydev/plum-ui add border-beamUsage
import { BorderBeam } from "@/components/ui/border-beam"<div className="relative rounded-2xl border p-6">
…
<BorderBeam />
</div>Examples
Two beams
Two beams with opposite directions and offset timing.
Upgrade to Pro
Unlimited projects, preview deployments and priority builds.
As a status
Mount it only while a build runs.
acme-web
main · 4f2c91a
API Reference
BorderBeam
Place inside a relative parent with a border radius.
| Prop | Type | Default |
|---|---|---|
sizeBeam length in px. | number | 80 |
durationSeconds per lap. | number | 6 |
delayOffset in seconds, to stagger several beams. | number | 0 |
borderWidthThickness in px — match the parent border. | number | 1 |
colorFromHead color of the beam. | string | "var(--foreground)" |
colorToTail color of the beam. | string | "transparent" |
reverseTravel counter-clockwise. | boolean | false |
Notes
- Uses CSS
offset-path: rect()and a border mask — no SVG, no measuring. - Renders nothing with reduced motion.