Skip to content

Instantly share code, notes, and snippets.

@pugson
Created January 29, 2024 00:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pugson/7ada2c0aad9ce3b715bfe6a2a1c536d6 to your computer and use it in GitHub Desktop.
Save pugson/7ada2c0aad9ce3b715bfe6a2a1c536d6 to your computer and use it in GitHub Desktop.
SVG → JSX
SVG Attribute JSX Property
class className
fill-opacity fillOpacity
stroke-opacity strokeOpacity
stroke-width strokeWidth
stroke-linecap strokeLinecap
stroke-linejoin strokeLinejoin
stroke-dasharray strokeDasharray
stroke-dashoffset strokeDashoffset
xlink:href xlinkHref
clip-path clipPath
stop-color stopColor
view-box viewBox
text-anchor textAnchor
gradient-transform gradientTransform
gradient-units gradientUnits
pattern-content-units patternContentUnits
pattern-units patternUnits
pattern-transform patternTransform
mask-content-units maskContentUnits
mask-units maskUnits
alignment-baseline alignmentBaseline
baseline-shift baselineShift
enable-background enableBackground
image-rendering imageRendering
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment