Dashed Strokes with SVG stroke-dasharray
Using `stroke-dasharray` to break an SVG stroke into a repeating pattern of dashes and gaps, the foundation of the line-drawing animation technique.
Content tagged stroke-dasharray
Post:Animating SVG: A Guide to CSS Transitions and Keyframes
Bring static shapes to life with transitions and @keyframes.Learn how to animate SVG with CSS: transitions vs @keyframes, self-drawing lines, clip-path reveals, staggered delays, motion paths, shape morphing, and scroll-driven timelines.Snippet:CSS & SVG Loading Spinner from One Circle
Build an SVG loading spinner from one circle.Build an accessible SVG loading spinner from one circle: pathLength and stroke-dasharray draw the arc, CSS spins it, with reduced-motion support.Snippet:SVG Circular Progress Ring with CSS Variables
Build an SVG progress ring from one CSS variable.Build an accessible SVG circular progress ring: pathLength and a --progress variable set the arc, with a gradient variant and smooth value transitions.Post:SVG Essentials: Mastering the Path Element
Understand SVG paths, curves, and commandsA complete guide to the SVG path element — path commands, coordinates, bézier curves, arcs, compound paths and fill-rule, pathLength-based line-draw animation, CSS's path() function, stroke rendering, and the shorthand tricks behind exported path data.Snippet:SVG Marching Ants Border for Drop Zones and Selections
Animate a marching dashed SVG border around any box.Build a marching ants border with an SVG rect and stroke-dashoffset: a seamless loop, a crisp overlay for any box size, and reduced-motion support.