Skip to content
ProLifetime access for $199, paid once, every future release included
Truffle UI

Border Beam

Pro

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

Installation

pnpm dlx shadcn@latest add @viewport/border-beam

First time? Add the @viewport registry to components.json. Setup takes one minute.

Usage

The code behind the preview above comes with Truffle Pro.

Props

PropTypeDefault
sizenumber

Length of the beam in pixels.

120
durationnumber

Seconds for one lap.

7
delaynumber

Seconds to offset the start. Use to stagger multiple beams.

0
colorFromstring"var(--brand)"
colorTostring"var(--brand-3)"
widthnumber

Border thickness in pixels.

1.5
classNamestring—

Accessibility

  • Decorative and aria-hidden.
  • Hidden under reduced motion.
  • Uses CSS offset-path; no JavaScript.