Font Awesome
The internet's most popular icon library — 76,000+ GitHub stars, 1.8M weekly downloads
STATS
OVERVIEW
Font Awesome is the world's most widely used icon library, powering icons on millions of websites since 2012. With over 76,000 GitHub stars and 1.8 million weekly npm downloads, it has defined the default icon language of the web for over a decade.
Version 6 is now Long Term Support (LTS) with 2,058 free icons across solid, regular, and brands styles. Version 7 is the latest active release with expanded icon coverage, improved tree-shaking, and better performance. The Pro plan unlocks 16,000+ icons across 10 styles including duotone, sharp, and thin variants.
Font Awesome splits into multiple npm packages: @fortawesome/fontawesome-svg-core for the rendering engine, separate packs for each style (free-solid-svg-icons, free-regular-svg-icons, free-brands-svg-icons), and @fortawesome/react-fontawesome for the React component. Full TypeScript support is included. Next.js requires one extra SSR setup step to prevent a flash of unstyled icons during hydration.
// VERDICTFont Awesome is the safe, battle-tested choice — especially when you need brand icons (GitHub, Twitter, LinkedIn) or are maintaining a legacy codebase. For greenfield projects in 2026 that don't need brand logos, Lucide Icons offers a cleaner API, simpler installation, and a more modern aesthetic with fewer trade-offs.
INSTALLATION
npm install @fortawesome/fontawesome-svg-core npm install @fortawesome/free-solid-svg-icons npm install @fortawesome/free-regular-svg-icons npm install @fortawesome/free-brands-svg-icons npm install @fortawesome/react-fontawesome
npm install @fortawesome/fontawesome-svg-core npm install @fortawesome/free-solid-svg-icons npm install @fortawesome/react-fontawesome // Note: Add these two lines to your root layout.tsx to prevent SSR flash: import '@fortawesome/fontawesome-svg-core/styles.css' and config.autoAddCss = false
npm install @fortawesome/fontawesome-svg-core npm install @fortawesome/free-solid-svg-icons npm install @fortawesome/vue-fontawesome@latest
// No official Svelte package. // Use SVG files directly from fontawesome.com or a community wrapper.
npm install @fortawesome/fontawesome-free // Or via CDN in HTML: // <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.x.x/css/all.min.css" />
CODE EXAMPLES
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import { faHome, faSearch, faCog } from '@fortawesome/free-solid-svg-icons'
export function NavBar() {
return (
<nav>
<FontAwesomeIcon icon={faHome} />
<FontAwesomeIcon icon={faSearch} />
<FontAwesomeIcon icon={faCog} />
</nav>
)
}// Using size prop (em-based)
<FontAwesomeIcon icon={faHome} size="xs" /> // 0.75em
<FontAwesomeIcon icon={faHome} size="sm" /> // 0.875em
<FontAwesomeIcon icon={faHome} /> // 1em (default)
<FontAwesomeIcon icon={faHome} size="lg" /> // 1.25em
<FontAwesomeIcon icon={faHome} size="xl" /> // 1.5em
<FontAwesomeIcon icon={faHome} size="2xl" /> // 2em
// Fixed width for aligned icon lists
<FontAwesomeIcon icon={faHome} fixedWidth />import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import { faHeart, faStar, faSpinner } from '@fortawesome/free-solid-svg-icons'
export function Examples() {
return (
<div className="flex items-center gap-4">
{/* Color via Tailwind */}
<FontAwesomeIcon icon={faHeart} className="text-red-500 h-5 w-5" />
{/* Rotation */}
<FontAwesomeIcon icon={faStar} rotation={90} className="text-yellow-400" />
{/* Spin animation for loading */}
<FontAwesomeIcon icon={faSpinner} spin className="text-blue-500" />
</div>
)
}import { faGithub, faTwitter, faLinkedin, faReact } from '@fortawesome/free-brands-svg-icons'
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
// Brand icons — unique to Font Awesome among free libraries
export function SocialLinks() {
return (
<div className="flex gap-4">
<FontAwesomeIcon icon={faGithub} className="h-6 w-6" />
<FontAwesomeIcon icon={faTwitter} className="h-6 w-6 text-sky-400" />
<FontAwesomeIcon icon={faLinkedin} className="h-6 w-6 text-blue-600" />
<FontAwesomeIcon icon={faReact} className="h-6 w-6 text-cyan-400" />
</div>
)
}// app/layout.tsx — REQUIRED for Next.js to prevent style flash
import { config } from '@fortawesome/fontawesome-svg-core'
import '@fortawesome/fontawesome-svg-core/styles.css'
config.autoAddCss = false
// This prevents Font Awesome from injecting CSS on the client
// during SSR hydration, which causes a brief flash of full-size icons.