React AnimeJS
Components/SVG Motion Path4 / 25

SVG Motion Path

svgIntermediateRead the docs

Code

1<AnimeMotionPath path={trackRef} duration={5000} ease="linear" loop autoplay>
2 <circle r={5} fill="accent" />
3</AnimeMotionPath>

Move elements along an SVG motion path.

Live preview
Motion PathCar follows Suzuka track via AnimeMotionPath
Props
NameTypeDefaultDescription
pathRefObject<SVGPathElement>-SVG path ref to follow
durationnumber1000Duration in ms
easestringlinearEasing function

Related components