Animated Beam
An animated beam of light that travels along a path between two elements.
The beam animates automatically upon mounting. It dynamically recalculates its path when the container or the referenced elements are resized.
Options you can pass to customize this component.
containerRef*React.RefObject<HTMLElement>Reference to the container element that wraps both source and target elements.
fromRef*React.RefObject<HTMLElement>Reference to the source element where the beam starts.
toRef*React.RefObject<HTMLElement>Reference to the target element where the beam ends.
curvaturenumberThe amount of curve in the beam path.
reversebooleanIf true, the animation flows from the target to the source.
pathColorstringThe color of the background path.
pathWidthnumberThe width of the beam path.
pathOpacitynumberThe opacity of the background path.
gradientStartColorstringThe starting color of the animated gradient.
gradientStopColorstringThe ending color of the animated gradient.
delaynumberDelay before the animation starts.
durationnumberDuration of the beam animation.
npx shadcn add amitgajare2/ariseui/animated-beam1