Change SVG Stroke Color in React

Prepare stroke for React props / JSX and copy a ready snippet

Tailwind? Stroke + TailwindJS? Stroke + JS

FAQ

Quick answers

How do I change SVG stroke color in React?
Paste the SVG, click Apply + copy React, put the markup in a component, and pass color via style or className as in the snippet.
stroke or strokeWidth in JSX?
React uses camelCase DOM props (stroke, strokeWidth). currentColor still works the same as in HTML.
Prefer Tailwind classes in React?
Use Change SVG Stroke Color Tailwind for stroke-current utility patterns.
Need a plain CSS recipe?
Open Change SVG Stroke Color with CSS.
Change stroke color → Stroke + CSS → Use currentColor → Stroke + Tailwind →
Open full editor →

Source

Type or paste SVG markup. The preview on the right updates as you type.

Ready

Live preview

PNG export · 2× for retina