Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to style svgs in react

the main reason why svgs can't be styled in react is that they are wrapped
iside img element, which takes width but not color
use your SVG as a component, then pass color and width through props
 
PREVIOUS NEXT
Tagged: #style #svgs #react
ADD COMMENT
Topic
Name
5+2 =