Loading preview
A tilted wall of vertically scrolling columns, for screenshots and showcases.
A light that travels around the border of a card or container.
npx shadcn@latest add @venusui/border-beamRun this in a project set up with shadcn. If you haven’t set it up yet, run npx shadcn@latest init first.
Paths use the default shadcn aliases. The CLI follows the aliases in your components.json.
@/components/ui/border-beam.tsxThe code behind the preview above.
border-beam-demo.tsx
import { BorderBeam } from "@/components/ui/border-beam"
export default function BorderBeamDemo() {
return (
<div className="relative w-full max-w-sm rounded-xl border bg-card p-6">
<p className="text-sm font-medium text-muted-foreground">Deployment</p>
<p className="mt-2 text-2xl font-semibold tracking-tight">Building…</p>
<p className="mt-1 text-sm text-muted-foreground">The light keeps moving while work is in progress.</p>
<BorderBeam />
</div>
)
}
| Prop | Type | Default | Description |
|---|---|---|---|
| duration | string | "6s" | Time for one trip around the border, as a CSS duration. |
| color | string | "var(--foreground)" | Beam color. Any CSS color. |
| borderWidth | number | 1.5 | Beam thickness, in pixels. |
| length | number | 12 | Beam length as a percentage of a full turn. |
All <div> props, including className and style.
border-beam keyframes, the --border-beam-angle property and --animate-border-beam to your CSS.@property support (all current browsers). Older browsers show no beam.<BorderBeam /> as the last child of a relative element. It follows the parent’s border-radius.color="oklch(0.7 0.15 250)", or two beams with different duration values for a layered effect.aria-hidden and ignores the pointer.position: relative, and your browser must support CSS masks with exclude, which all current browsers do.@property --border-beam-angle and the border-beam keyframes are in your CSS.Unknown registry "@venusui"npx shadcn@latest), install by URL, or register it with its address: npx shadcn@latest registry add @venusui=https://venusui.com/r/{name}.json.No components.json foundnpx shadcn@latest init in your project first.A tilted wall of vertically scrolling columns, for screenshots and showcases.
A card that tilts in 3D toward the pointer with spring physics.
Curved lines across a section with light traveling along them.