Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

solid icons 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

PREVIOUS NEXT
Code Example
Javascript :: how to copy text in react 
Javascript :: react router url params 
Javascript :: js add value to html input 
Javascript :: reverse number javascript 
Javascript :: removing duplicates in array javascript 
Javascript :: terminate execution in jquery 
Javascript :: javascript code to loop through array 
Javascript :: neffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory 
Javascript :: delay js function 
Javascript :: jquery serialize 
Javascript :: validador de telefone javascript 
Javascript :: Hide elements until Alpine Js loads 
Javascript :: react native port 
Javascript :: select second child in js 
Javascript :: javascript array to comma separated list 
Javascript :: alphabetical order array javascript 
Javascript :: remove last two elements array javascript 
Javascript :: javascript reverse array map 
Javascript :: js replace non a-z 
Javascript :: fibonacci js code 
Javascript :: Get Substring between two characters using javascript 
Javascript :: how to hash password in node js 
Javascript :: columndefs in datatable not working while setting width jquery 
Javascript :: javascript screen width 
Javascript :: century from year javascript 
Javascript :: get current scroll height javascript 
Javascript :: communication with service worker 
Javascript :: npm update react 
Javascript :: connecting to mongodb using mongoose 
Javascript :: svelte mount 
ADD CONTENT
Topic
Content
Source link
Name
1+8 =