Using a Package Manager

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

Mind the (Alpha) Gap!

Remember Version 6 is an alpha release that's still under contruction and we may need to make breaking changes before final release. Use with caution!

We have a couple of packages available:

  • An all-Pro-icons package with all icons and styles, including Pro icons
  • An all-Free-icons package with just the Free icons for open-source projects

Pick the one that suits your project and follow the steps below to get set up.

# Configure Access

To access the Pro packages, you'll first need to get your super-secret npm access token, which you'll find on your Font Awesome account page:

Get Your Secret npm Token

Then you'll need to configure the @fortawesome scope to use our Pro npm registry. You can set this up globally or per-project.

# Set Up npm Token for All Projects

This global set-up will allow any of your projects to use the Font Awesome package and your token. For the global set up, run:

npm config set "@fortawesome:registry" https://npm.fontawesome.com/
npm config set "//npm.fontawesome.com/:_authToken" [YOUR FONT AWESOME SECRET npm TOKEN]

# Set Up npm Token for a Specific Project

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

You'll need to create a .npmrc file in the root of your project (or wherever your package.json file lives) and put this in it:

@fortawesome:registry=https://npm.fontawesome.com/
//npm.fontawesome.com/:_authToken=[YOUR FONT AWESOME SECRET npm TOKEN]

# Alternate Per-project Set-up: Using Environment Variables

You can use npm environment variables in your .npmrc file if you prefer:

@fortawesome:registry=https://npm.fontawesome.com/
//npm.fontawesome.com/:_authToken=${FONTAWESOME_NPM_AUTH_TOKEN}

And then run this command to install the all Pro icons package (or edit the package name at the end to install a different package):

FONTAWESOME_NPM_AUTH_TOKEN=[YOUR FONT AWESOME SECRET npm TOKEN] npm install --save @fortawesome/fontawesome-pro@next

# Install Your Package

# The Pro Package

Once you have global or per-project access set up, you can install the Version 6 alpha package via npm:

npm install --save @fortawesome/fontawesome-pro@next

Or yarn:

yarn add @fortawesome/fontawesome-pro@next

# The Free Package

If you need just the Free icons, we have a slimmed down free-only package for that. Install with this command:

npm install --save @fortawesome/fontawesome-free@next
yarn add @fortawesome/fontawesome-free@next

# Pick Your Method and Add Icons

You're all set to reference Font Awesome in your project. You can use either Web Fonts + CSS or SVG + JS to get icons into your projects.

Not sure which to pick? Learn which is right for your project.

Something on your mind? We're all ears!

New icons just what you wanted? New thin style all that? Docs missing something key? Drop us a line and tell us all the good, bad and the ugly so we can make it even more awesome.

Manufacturers Protocol dictates this alpha cannot be captured. It must self-destruct.