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.
durationnumberSeconds for one full lap of the border.
radiusnumberBorder radius in px — the beam's path is corner-radius aware and matches this exactly.
reversebooleanTravel counterclockwise instead of clockwise.
delaynumberSeconds to wait before the first lap starts.
pausedbooleanFreeze 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.