crucıble

Weld

A light beam traveling the border in a continuous loop like a welding arc: a blinding white-hot head with a cool blue-white tail, corner sparks, and a fading heat discoloration. Pure CSS, corner-radius aware via offset-path.

cssfree

Installation

CLI

npx shadcn@latest add @crucible/weld

Props

PropTypeDefaultDescription
headColorstringwhiteColor of the blinding beam head. Any CSS color.
tailColorstringcool blue-whiteColor of the tail trailing the head.
durationnumber3.2Seconds for one full lap of the border.
radiusnumber10Border radius in px — the beam's path is corner-radius aware and matches this exactly.
reversebooleanfalseTravel counterclockwise instead of clockwise.
delaynumber0Seconds to wait before the first lap starts.
pausedbooleanfalseFreeze the animation, holding the current frame.
Also accepts all props of React.ComponentPropsWithoutRef<"button"> — they pass through to the underlying element.

Honors prefers-reduced-motion with a designed static fallback, and passes className through.