Border Beam

A beam of light that travels around the border of any box.

no dependenciesMIT · free

Pro plan

The beam keeps circling the card.

New: 42 components

Installation

npx shadcn@latest add https://ombakui.com/r/border-beam.json

Usage

import { BorderBeam } from "@/components/border-beam";

<BorderBeam className="rounded-2xl">
  <div className="p-6">Pro plan</div>
</BorderBeam>

Props

PropTypeDefaultDescription
children*ReactNode–The content that gets the moving border.
colorsstring[]["transparent", "#2dd4bf", "#a5f3fc"]Beam colors, from tail to head.
durationnumber4Seconds for one lap.
widthnumber1.5Border thickness in px.
lengthnumber0.25Length of the beam as a share of the lap, 0–1.
classNamestring–