Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xmlns:xlink (and other SVG namespaced attrs) not supported #4908

Closed
richard-uk1 opened this issue Sep 18, 2015 · 5 comments
Closed

xmlns:xlink (and other SVG namespaced attrs) not supported #4908

richard-uk1 opened this issue Sep 18, 2015 · 5 comments

Comments

@richard-uk1
Copy link

At the moment when I try to use a defs element, I get the following error:

Namespace tags are not supported. ReactJSX is not XML.

Namespaces are required for effective use of SVG. Is there a design decision not to allow namespaced tags, or is it just a feature that needs implementing?

@richard-uk1
Copy link
Author

Found issue #2250 which seems to solve this.

@agm1984
Copy link

agm1984 commented Feb 27, 2018

In the interest of saving time, the solution is to use camel case:

<svg xlinkHref="http://i.imgur.com/w7GCRPb.png" />

renders to

<svg xlink:href="http://i.imgur.com/w7GCRPb.png" />

@abhinavsri360
Copy link

This helped a lot, Thank you @agm1984

@hungdoansy
Copy link

This helped a lot. It's like changing from "stroke-width" to "strokeWidth"

@gbyteinfo
Copy link

gbyteinfo commented Dec 13, 2021

In the interest of saving time, the solution is to use camel case:

<svg xlinkHref="http://i.imgur.com/w7GCRPb.png" />

renders to

<svg xlink:href="http://i.imgur.com/w7GCRPb.png" />

Obrigado agm1984, Lembrando que para
<svg xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 24 150 28 " />
Mesma ideia
<svg xmlnsXlink="http://www.w3.org/1999/xlink" viewBox="0 24 150 28 " />

por ai vai valew !!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants