Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

fontawesome in next js

// installation
npm install @fortawesome/fontawesome-svg-core @fortawesome/free-brands-svg-icons @fortawesome/free-solid-svg-icons @fortawesome/react-fontawesome

//_app.js 
import '@fortawesome/fontawesome-svg-core/styles.css'; //importing font awesome css
import { config } from '@fortawesome/fontawesome-svg-core';
config.autoAddCss = false; // Tell Font Awesome to skip adding the CSS automatically since it's being imported above

// component.js
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';

// for brand icons
import {
  faYoutube,
  faFacebook,
  faTwitter,
  faInstagram
} from "@fortawesome/free-brands-svg-icons";

// for solid icons
import {faSearch} from "@fortawesome/free-solid-svg-icons"


<FontAwesomeIcon icon={faFacebook} />// use like this
Comment

add font awesome with nextjs

import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';

<FontAwesomeIcon icon={['fab', 'github']} />
Comment

PREVIOUS NEXT
Code Example
Javascript :: window onload javascript 
Javascript :: js add string to beginning of string 
Javascript :: query params vuejs 
Javascript :: html tag run only after whole page is loaded 
Javascript :: check frequency of string in array js 
Javascript :: MIN_SAFE_INTEGER 
Javascript :: javascript loop through array 
Javascript :: image background full width react 
Javascript :: npm view available versions 
Javascript :: capturar el valor de un input con jquery 
Javascript :: react native loading 
Javascript :: nombre random js 
Javascript :: yarn react-native-async-storage 
Javascript :: how to check if localhost javascript 
Javascript :: react copy to clipboard 
Javascript :: js reduce concat numbers 
Javascript :: run function once domcontentloaded javascript 
Javascript :: $ is not defined 
Javascript :: jvascript number to column letter 
Javascript :: classname toggle js 
Javascript :: update cypress 
Javascript :: form input field readonly angular 
Javascript :: javascript iterate object key values 
Javascript :: how to detect a button click in javascript 
Javascript :: update to angular 12 
Javascript :: javascript print numbers in the given range 
Javascript :: exceljs column pick from drop down list 
Javascript :: javascript removing items looping through array 
Javascript :: react open a link to an outside siite 
Javascript :: js rectangle collision 
ADD CONTENT
Topic
Content
Source link
Name
8+9 =