Border Beam
Send a short segment of light around an element's border to mark it as active or in progress.
Overview
Border Beam draws a small light segment that travels around its parent's border. Use it on one element at a time to mark something as live or in progress, such as a running build, a highlighted plan, or the card a tour is pointing at. The beam follows the parent's corner radius, paints only inside the border width, and leaves the content untouched.
Installation
Usage
import { BorderBeam } from "@/components/animated/border-beam"
<div className="relative overflow-hidden rounded-xl border p-5">
Deploying…
<BorderBeam duration={6} />
</div>Place it as the last child of a relative element. The radius is read from the parent; pass radius when the parent's radius changes after mount. Two beams with opposite reverse values and half-lap delay give a symmetrical effect.
Accessibility
The beam is decorative and hidden from assistive technology. Pair it with a text status such as "Building" so the state is never conveyed by motion alone. When reduced motion is requested, the beam stops and rests as a short static highlight.