How to add material-icons to React-Bootstrap

1.1k views Asked by At

I have tried

<Navbar.Collapse>
     <Nav>
         <NavItem eventKey={1} href="#">
             <i className="material-icons">face</i>Home
         </NavItem>
     </Nav>
  </Navbar.Collapse>

But not working. Linked the font cdn from public/index.html with the following link <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">

1

There are 1 answers

0
Madura Pradeep On

You can use the following package.

https://www.npmjs.com/package/react-google-material-icons

use it as follows.

import MaterialIcon from 'react-google-material-icons'

<MaterialIcon icon="account_box" size={36}/>