So after doing npm install material-design-icons
, how do I use them in my React
application?
The methods included here doesn't include the npm
method.
Using the Icon Google's Material Icons provides a long list of icons. Choose any one of them and add the name of the icon class to any HTML element within the < body > tag. In the following example, we have used the icon named accessibility that belongs to the action category.
To embed Google Icons in your HTML web pages you have to add the link of material-icons font library in the <head> section of your HTML file and then add the class material-icons in the <i> or <span> tag of the <body> section along with the name of the icon.
This is the way you can reference it (in your styles.css):
@import '~material-design-icons/iconfont/material-icons.css';
To use it:
<i class="material-icons">cloud_upload</i>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With