Skip to content

Using a Package Manager

For those using package managers (such as npm, yarn, or pnpm), you can use the Font Awesome packages to keep your project up-to-date with the latest icons and improvements.

We package up our icons and Styling Toolkits for project use in a few different ways.

Package TypeDescription
Kit PackageCustom package, Pro+ icons
SVG Icon PackagesIndividual core toolkit + style packages
”All” Inclusive PackagesOne package with everything except Pro+ icons (which is a LOT)

We recommend using a Kit package, but read on and select the package that is right for your project.

Font Awesome Kits are the most efficient and customized way to get just the Font Awesome icons you need into your project when using a package manager!

A Kit package will contain whatever you put into your Kit including:

  • Any individual icons or styles that you’ve added to your subset - including Pro+ icons if you have a Pro+ plan!
  • Uploaded Custom Icons
  • Font Awesome’s core Styling Toolkit

A Kit and its package are subsetted and optimized so it will not include any icon styles and features you have not enabled. Talk about lean and mean!

These packages are JavaScript-based and replace any <i> instances with <svg> icons. They also handle loading the proper CSS into your page to render those icons.

SVG Icon Packages are great to use alongside our official Font Awesome Vue.js, React, and other JavaScript components, or installing and using with our JavaScript API.

Package NameWhat’s includedAvailability
free-brands-svg-iconsBrands Icon PackFree
free-solid-svg-iconsFree Classic Solid IconsFree
free-regular-svg-iconsFree Classic Regular IconsFree
pro-solid-svg-iconsPro Classic Solid IconsPro only
pro-regular-svg-iconsPro Classic Regular IconsPro only
pro-light-svg-iconsPro Classic Light IconsPro only
pro-thin-svg-iconsPro Classic Thin IconsPro only
sharp-solid-svg-iconsSharp Solid IconsPro only
sharp-regular-svg-iconsSharp Regular IconsPro only
sharp-light-svg-iconsSharp Light IconsPro only
sharp-thin-svg-iconsSharp Thin IconsPro only
duotone-solid-svg-iconsDuotone Solid IconsPro only
duotone-regular-svg-iconsDuotone Regular IconsPro only
duotone-light-svg-iconsDuotone Light IconsPro only
duotone-thin-svg-iconsDuotone Thin IconsPro only
sharp-duotone-solid-svg-iconsSharp Duotone Solid IconsPro only
sharp-duotone-regular-svg-iconsSharp Duotone Regular IconsPro only
sharp-duotone-light-svg-iconsSharp Duotone Light IconsPro only
sharp-duotone-thin-svg-iconsSharp Duotone Thin IconsPro only
fontawesome-svg-coreSVG Core used as subsetting tool or base libraries for larger integrationsFree

All inclusive packages contain ALL the Font Awesome icons and supporting assets in ALL the formats. These packages are the same as the Font Awesome download - whether Free or Pro - for the web. They contain all CSS, Web Fonts, SCSS, and SVG assets. But these packages are really huge and may have performance and npm package bandwidth usage implications if not used responsibly.

Package NameWhat’s includedAvailability
fontawesome-freeWeb Fonts, SVGs, CSS, Sass, and core toolkit for all Free iconsFree
fontawesome-proWeb Fonts, SVGs, CSS, Sass, and core toolkit for all Pro families (Classic, Duotone, Sharp, and Sharp Duotone) in all styles (Solid, Regular, Light, and Thin) but does not include Pro+ iconsPro only

If you plan to use the Pro packages, which contain more icons and styles, you’ll need to have an active subscription to a Pro Plan and a valid Pro Package Token and then follow the steps below to configure Pro access for your project.

Your package token gives you access to our registry, npm.fontawesome.com. In the next steps we’ll configure specific NPM scopes to use this registry.

Project-specific Using Configuration Files

Section titled “Project-specific Using Configuration Files”

This per-project setup lets you configure each project individually, which can be good for teams and CI/CD.

To authenticate when using npm or pnpm, create a .npmrc file in the root of your project (or wherever your package.json file lives). For yarn (version 2.x or later) you will need to create a .yarnrc.yml file. Then add one of the following snippets to the file.

If you’ve subsetted a Kit or uploaded icons to a specific Kit and want to use those through a package manager, add this to your package manager configuration.

Terminal window
@fortawesome:registry=https://npm.fontawesome.com/
@awesome.me:registry=https://npm.fontawesome.com/
//npm.fontawesome.com/:_authToken=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
Terminal window
@fortawesome:registry=https://npm.fontawesome.com/
//npm.fontawesome.com/:_authToken=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX

Yep. You can specify both @awesome.me and @fortawesome in the same config files. This is useful if you are in the process of migrating to the newer Kit Packages.

Terminal window
@awesome.me:registry=https://npm.fontawesome.com/
@fortawesome:registry=https://npm.fontawesome.com/
//npm.fontawesome.com/:_authToken=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX

A more secure way to configure your .npmrc or .yarnrc.yml files is with environment variables. This can help prevent tokens leaking and make token rotation easier (should you need to perform it).

While your .npmrc or .yarnrc.yml is normally checked in to your source code repository, environment variables values should not be. Using environment variables for your token is a way to keep from checking it in to your source code repository, which prevents it from being shared with others who should not have it.

This example uses FONTAWESOME_PACKAGE_TOKEN as the environment variable name.

Terminal window
@fortawesome:registry=https://npm.fontawesome.com/
@awesome.me:registry=https://npm.fontawesome.com/
//npm.fontawesome.com/:_authToken=${FONTAWESOME_PACKAGE_TOKEN}

If you’re using a proxy, you can use basic authentication in your .npmrc file.

Terminal window
@fortawesome:registry=https://npm.fontawesome.com/
@awesome.me:registry=https://npm.fontawesome.com/
//npm.fontawesome.com/:username=username
//npm.fontawesome.com/:_password=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX

Once you have configured access global or per-project access setup (for Pro packages) and have your project set up, you’re ready to install Font Awesome via packages.

If you’re using a Kit, you can install a Kit Package with the following command - just make sure to replace KIT_CODE with your specific Kit’s ID:

Terminal window
npm install --save '@awesome.me/kit-KIT_CODE@latest'

Or if you’re using environment variables, you can do this instead:

Terminal window
FONTAWESOME_PACKAGE_TOKEN=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX npm install --save '@awesome.me/kit-KIT_CODE@latest'

Manually choose and install the particular icon styles you want to use as individual packages alongside the utility-based SVG Core package.

Terminal window
# Installing SVG Core for subsetting and base libaries.
npm install --save @fortawesome/fontawesome-svg-core
# Select the styles you need and install them with the following commands.
npm install --save @fortawesome/pro-solid-svg-icons
npm install --save @fortawesome/pro-regular-svg-icons
npm install --save @fortawesome/pro-light-svg-icons
npm install --save @fortawesome/pro-thin-svg-icons
npm install --save @fortawesome/pro-duotone-svg-icons
npm install --save @fortawesome/duotone-regular-svg-icons
npm install --save @fortawesome/duotone-light-svg-icons
npm install --save @fortawesome/duotone-thin-svg-icons
npm install --save @fortawesome/sharp-solid-svg-icons
npm install --save @fortawesome/sharp-regular-svg-icons
npm install --save @fortawesome/sharp-light-svg-icons
npm install --save @fortawesome/sharp-thin-svg-icons
npm install --save @fortawesome/sharp-duotone-solid-svg-icons
npm install --save @fortawesome/sharp-duotone-regular-svg-icons
npm install --save @fortawesome/sharp-duotone-light-svg-icons
npm install --save @fortawesome/sharp-duotone-thin-svg-icons

Or if you’re using environment variables, you can do this instead:

Terminal window
FONTAWESOME_PACKAGE_TOKEN=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX npm install --save @fortawesome/pro-solid-svg-icons

Similarly, you can manually choose Free icon styles to install and include in your project (alongside the SVG Core package).

Terminal window
# Installing SVG Core for subsetting and base libaries.
npm install --save @fortawesome/fontawesome-svg-core
# Select the styles you need and install them with the following commands.
npm install --save @fortawesome/free-solid-svg-icons
npm install --save @fortawesome/free-regular-svg-icons
npm install --save @fortawesome/free-brands-svg-icons

You can install all of the assets we include in Font Awesome Pro for the Web’s download via this package.

Terminal window
npm install --save @fortawesome/fontawesome-pro

Or if you’re using environment variables, you can do this instead:

Terminal window
FONTAWESOME_PACKAGE_TOKEN=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX npm install --save @fortawesome/fontawesome-pro

Similarly, you can install all of the Free assets we include in Font Awesome Free for the Web’s download via this package.

Terminal window
npm install --save @fortawesome/fontawesome-free

Your packages are now installed and are all set to be used in your project.

If you’ve installed your Kit Package or an All Inclusive Package, you’re good to start adding and styling icons in your project.

With our SVG Icon Packages, continue onto next steps such as using our Vue, React, Ember, and other JavaScript Components. Or check out our JavaScript API.

If you’re using Continuous Integration (CI) in your project’s workflow, remember to tune your CI to keep your package bandwidth usage low. We’ll show you how.


Use the following commands to get configuration information for your package manager:

Package ManagerConfiguration Info Command
npmnpm config list
yarnyarn config --why ( pay attention to npmScopes entry)
pnpmpnpm config list (pay attention to the config from section)

Confirm Credentials for Private Repository use

Section titled “Confirm Credentials for Private Repository use”

If your application needs to use the private repository, ensure that credentials are set. Here’s some expected output for each package management tool…

; "user" config from /path/to/.npmrc
# ...
@fortawesome:registry = "https://npm.fontawesome.com/"
//npm.fontawesome.com/:_authToken = REDACTED

Make sure that the environment variable is available and readable by the package manager, this may be the cause of authentication issues on remote servers. You’ll see 4xx HTTP status codes if this is the case.

Switching from Private to Public Repository

Section titled “Switching from Private to Public Repository”

When switching from the Private Repository to the Public Repository, remove the currently installed Font Awesome packages from the lock file. The specific command to do this depends on the package manager you are using (yarn or npm). If you are brave enough, you can hand-edit these files.

Here’s a summary of our repositories alongside what they provide and what requirements each has.

NamePublic?Pro Sub?KitProFree
https://npm.fontawesome.com
https://registry.yarnpkg.com
https://registry.npmjs.org

We officially support the following Package Managers:

NameURL
npmhttps://www.npmjs.com/
yarn (version 2.x and greater)https://yarnpkg.com/
pnpmhttps://pnpm.io/