SVG TO
COMPONENT
Paste SVG markup and get a ready-to-use React, Vue, or Svelte component. Runs entirely in your browser — no server, no upload.
COMPONENT NAME
SVG INPUT
REACT + TYPESCRIPT
Output will appear here…
React output
- JSX — props spread, width/height defaults
- TSX — typed with
React.SVGProps<SVGSVGElement> class→classNamestroke-width→strokeWidth- Optional
React.memowrapping
Vue & Svelte output
- Vue SFC:
script setup+v-bind="$attrs" - Svelte:
$$restPropsspread - Native SVG attribute names
- width/height props default to 24
Related tools
- SVG Optimizer — Minify before converting
- SVG to JSX — React/Preact focused
- Color Converter — Convert color formats