Skip to Content
zjkm-ui
Components

Border Beam

A beam of light that travels around an element's border.

ProPro, coming soon.

Team plan

Shared projects, roles and priority support.

Props
6.0s
80px
1.5px
12px
<BorderBeam>
  <Card />
</BorderBeam>

Get notified

Border Beam is a Pro effect. Join the waitlist and we'll email you when it's available.

Usage

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

export function PlanCard() {
  return (
    <BorderBeam radius={12}>
      <div className="rounded-xl border p-6">Team plan</div>
    </BorderBeam>
  );
}

Props

PropTypeDefaultDescription
childrenReactNodeThe element the beam travels around.
durationnumber6Seconds per lap.
sizenumber80Length of the beam in pixels.
colorFromstring"#7dd3fc"Colour at the beam's head.
colorTostring"#c084fc"Colour at the beam's tail.
borderWidthnumber1.5Width of the beam's border line in pixels.
radiusnumber12Corner radius in pixels. Match your element's border-radius.
reversebooleanfalseTravel counter-clockwise.
classNamestringClasses for the wrapper.

On this page