Skip to content

SVG Sprites

Looking to use Font Awesome icons as SVG Sprites? We’ve got ‘em. And there’s no need to load JavaScript code at runtime.

We’ll cover the basic of adding icons as SVG sprites, and cover the sticking points of using SVG sprites to help you ensure your projects are a good fit for their use.

Inside the Free, Pro, or Pro+ Font Awesome Download or package you’ve got, you’ll find the files you need in a couple of different formats.

FormatFolderWhat’s the difference?Impact on Rendering
Cropped/spritesSVG viewbox width and height are cropped to the edges of the interior symbol.Icons will only take up as much space as their dimensions need.
Full/sprites-fullSVG viewbox width and height are set to a standard square based on the Icon CanvasIcons will be rendered at a consistent width with surrounding whitespace.

StyleAvailabilitySpritePreview
SolidFree or Prosolid.svg
RegularFree or Proregular.svg
LightPro onlylight.svg
ThinPro onlythin.svg

StyleAvailabilitySpritePreview
SolidPro onlyduotone.svg
RegularPro onlyduotone-regular.svg
LightPro onlyduotone-light.svg
ThinPro onlyduotone-thin.svg

StyleAvailabilitySpritePreview
SolidPro onlysharp-solid.svg
RegularPro onlysharp-regular.svg
LightPro onlysharp-light.svg
ThinPro onlysharp-thin.svg

StyleAvailabilitySpritePreview
SolidPro onlysharp-duotone-solid.svg
RegularPro onlysharp-duotone-regular.svg
LightPro onlysharp-duotone-light.svg
ThinPro onlysharp-duotone-thin.svg

StyleAvailabilitySpritePreview
BrandsFreebrands.svg

StyleAvailabilitySpritePreview
RegularPro+ onlychisel-regular.svg

StyleAvailabilitySpritePreview
SolidPro+ onlyetch-solid.svg

StyleAvailabilitySpritePreview
RegularPro+ onlyjelly-regular.svg
Fill RegularPro+ onlyjelly-fill-regular.svg
Duo RegularPro+ onlyjelly-duo-regular.svg

StyleAvailabilitySpritePreview
SolidPro+ onlynotdog-solid.svg
Duo SolidPro+ onlynotdog-duo-solid.svg

StyleAvailabilitySpritePreview
RegularPro+ onlyslab-regular.svg
Press RegularPro+ onlyslab-press-regular.svg

StyleAvailabilitySpritePreview
LightPro+ onlythumbprint-light.svg

StyleAvailabilitySpritePreview
SemiboldPro+ onlywhiteboard-semibold.svg

To add icons from a sprite file, follow these steps:

  1. Grab the sprite file for the style or styles you want to use.
  2. Place this file with the rest of your static files, like CSS or images, in your project.
  3. In the body of your document, call the individual icon by name in the sprite file for the style you want to use. Make sure the path correctly points to where you placed the sprite files, and they are hosted on the same server!

Optionally, you can add accessibility hints via aria attributes to either hide the icon from assistive technology, or give it a proper human readable name.

Here’s some examples of how you can call icons in a variety of styles:

<header>
<ul>
<li>
<!-- referencing a couple of solid style icons -->
<svg>
<use href="/your-path-to-fontawesome/sprites/solid.svg#saxophone-fire"></use>
</svg>
</li>
<svg>
<use href="/your-path-to-fontawesome/sprites/solid.svg#trumpet"></use>
</svg>
</li>
<li>
<!-- referencing a thin style icon -->
<svg>
<use href="/your-path-to-fontawesome/sprites/thin.svg#trumpet"></use>
</svg>
</li>
<li>
<!-- referencing a duotone solid style icon -->
<svg>
<use href="/your-path-to-fontawesome/sprites/duotone.svg#sparkles"></use>
</svg>
</li>
<li>
<!-- referencing a sharp-duotone solid style icon -->
<svg>
<use href="/your-path-to-fontawesome/sprites/sharp-duotone-solid.svg#cat"></use>
</svg>
</li>
<li>
<a href="https://github.com/FortAwesome/Font-Awesome">
<!-- referencing a brands family icon -->
<svg>
<use href="/your-path-to-fontawesome/sprites/fa-brands.svg#github"></use>
</svg>
</a>
</li>
</ul>
</header>

SVG sprites have a few tricky points you need to know about. Make sure your project is a good fit for using this technique with the following in mind.