AnimationsNew

Border Trail

A short streak of light runs around a card border. Good for a loading state.

Customize

color
tailColor

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

More in Pro

View all

Props

8 properties
PropertyTypeDefaultDescription
sizenumber60Length of the glowing trail in pixels.
durationnumber5Seconds per lap.
transitionTransition—Custom Motion transition. Overrides duration.
onAnimationComplete() => void—Called after the last lap when repeat is finite.
styleCSSProperties—Styles of the glowing trail.
colorstring"#ffffff"Colour of the bright head of the trail.
tailColorstring"#a3a3a3"Colour the trail fades through behind the head.
classNamestring—Trail classes, e.g. a from-white/0 via-white gradient.

Dependencies

3 required packages

npm install motion clsx tailwind-merge

Related components

View all