SvgUri with Color
See original GitHub issueHow to set the color of svg loaded from url?
<SvgUri width="80%" height="80%" uri="https://unpkg.com/ionicons@5.0.0/dist/svg/person-outline.svg" color="red" fill="red" />
the snippet is not changing color.
Thank you.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:4
- Comments:8
Top Results From Across the Web
SvgUri with Color · Issue #1317 - GitHub
I understood that 'color' and 'fill' props intended to override all 'fill' and 'color' attributes on file. That would be great to have...
Read more >How to change color of SVG on react native? - Stack Overflow
Ok so it seems that the eva-icons are not fully supported by SvgUri. This is caused by a different svg/xml structure, so I...
Read more >How to display SVG files and change colors dynamically in ...
Changing colors dynamically1 (for single color). Just change the fill part of the SVG file to "currentColor" (the same way you change the...
Read more >Developers - SvgUri with Color - - Bountysource
Coming soon: A brand new website interface for an even better experience!
Read more >How to use SVG with Dynamic colors in React Native - Medium
How to use SVG with Dynamic colors in React Native. Dynamically Change SVG fill color. What is SVG? Scalable Vector ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Using
SvgXml
works for me too! To changeSvgUri
toSvgXml
, I simply usedfetch
like this. I give a closed tag to theuseState
, that otherwiseUnexpected end of input
error occurs.I’ve used this workaround for my icons:
<SvgXml width={45} height={45} xml={xml.replace(/black/g, 'red')} />