How to host Material icons offline with JavaScript?

Spread the love

Sometimes, we want to host Material icons offline with JavaScript.

In this article, we’ll look at how to host Material icons offline with JavaScript.

How to host Material icons offline with JavaScript?

To host Material icons offline with JavaScript, we install the material-design-icons NPM package.

To install it, we run

npm install material-design-icons --save

Then we import it with

import materialIcons from "material-design-icons/iconfont/material-icons.css";

This works with any Webpack project.

Conclusion

To host Material icons offline with JavaScript, we install the material-design-icons NPM package.

Leave a Reply

Your email address will not be published.