react: Missing SVG tags and attributes
Note from maintainers: Starting with React 15, we should have a complete support of the subset of SVG specifications that is actually implemented by browsers.
If you find a missing attribute, or if a tag does not work correctly, please write a comment below. Note that React.DOM.* factory functions might not provide all tags, but you should be able to use React.createFactory or React.createElement() directly for the missing ones. Or you can just use JSX which translates to React.createElement() and supports all tags inherently.
About this issue
- Original URL
- State: closed
- Created 10 years ago
- Comments: 107 (24 by maintainers)
Commits related to this issue
- Add vector-effect to SVG whitelist Requested in https://github.com/facebook/react/issues/1657#issuecomment-148420568 — committed to facebook/react by gaearon 8 years ago
I noticed that there seems to be quite a lot of confusion about the
xlink:hrefattribute. It is currently supported but you would need to write it in a different way:React will correctly turn that into
xlink:href, even in 0.14.x. See this fiddle for an example.+1 for adding support for
xmlns… In the mean time if anyone is interested in a workaround (which I needed to be able to support IE9-11) this is what I came up with:Yea,
xmlnsandxmlns:Xlinkare missing. https://github.com/facebook/react/pull/6471 has some in progress work to add it.