Answers for "how to import font awsome in react"

3

installing and using font awesome icons in react

// install font-awesome module
npm install --save font-awesome

// import font-awesome to your index.js file
import 'font-awesome/css/font-awesome.min.css'

// use icon like this
<i className="fa fa-spinner fa-spin">no spinner but why</i>
Posted by: Guest on July-07-2021
1

react import font awesome

npm install --save font-awesome
import '../node_modules/font-awesome/css/font-awesome.min.css'; 
or
import 'font-awesome/css/font-awesome.min.css';
Don't forget to use className as attribute
 render: function() {
    return <div><i className="fa fa-spinner fa-spin">no spinner but why</i></div>;
}
Posted by: Guest on August-11-2021
2

How to use font awewsome in react app

npm install --save font-awesome //install font awewsome 
import 'font-awesome/css/font-awesome.min.css'; //import in react app
Posted by: Guest on October-07-2021
0

use font awsome in react

npm install @fortawesome/fontawesome-svg-core @fortawesome/free-solid-svg-icons @fortawesome/react-fontawesome
Posted by: Guest on July-01-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language