Skip to content
roguelite labsAnthony Spezzano ↗
motion/border-trail

Border Trail

Animated conic-gradient border that spins around the element using CSS keyframes. No framer-motion required.

Use and inspectUse this when the motion supports the surrounding content. Connect callbacks and state to your app, keep the reset preview as a local demonstration, and add a reduced-motion fallback for movement or looping. The preview is synthetic; it does not call a backend.Next: inspect the source below and replace the demo inputs with your own data.
Border TrailAnimated conic-gradient border that spins around the element using CSS keyframes. No framer-motion required.

Props

PropTypeDefaultDescription
childrenrequiredReactNodeContent inside the bordered container
durationnumber3Trail spin duration in seconds
trailColorstring"#7c3aed"Trail highlight color
borderWidthnumber2Border width in px
borderRadiusnumber14Container border-radius in px