React AnimeJS
Components/SVG Draw3 / 25

SVG Draw

svgIntermediateRead the docs

Code

1<AnimeDraw draw={['0 0', '0 1', '1 1']} delay={index * 100} duration={2000} ease="inOutQuad" loop autoplay>
2 <path d={svgPath} stroke="currentColor" strokeWidth={2} />
3</AnimeDraw>

Animate SVG path drawing with stroke-dashoffset.

Live preview
SVG DrawStaged stroke draw via AnimeDraw
Props
NameTypeDefaultDescription
drawstring[]-Draw range keyframes
durationnumber1000Draw duration in ms
easestring'inOutQuad'Easing function
delaynumber0Start delay (use index * N to stagger)
loopbooleanfalseLoop the draw

Related components