CardsNew

Border Beam

A glowing beam travels around the edge of a card. Drop it inside any rounded box to bring the border to life.

Customize

colorFrom
colorTo

Based on Border Beam (MIT license) · Terms of use

More in Pro

View all

Props

10 properties
PropertyTypeDefaultDescription
sizenumber50Length of the beam, in pixels.
durationnumber6Time of one lap, in seconds.
delaynumber0Start offset, in seconds.
colorFromstring"#ffffff"Color of the beam head.
colorTostring"rgba(255,255,255,0.15)"Color of the beam tail.
borderWidthnumber1Border width, in pixels.
reversebooleanfalseThe beam runs the other way.
initialOffsetnumber0Where on the border the beam starts, in percent.
transitionTransition—Custom Motion transition.
classNamestring—Classes for the beam itself.

Dependencies

3 required packages

npm install motion clsx tailwind-merge

Related components

View all