Picker for Font Awesome icons from a searchable custom field. Free icons work out of the box; add an API token for Pro families and kits.
released October 1, 2026
npm install strapi-plugin-fontawesome-icon
A Strapi v5 custom field for picking Font Awesome icons. Editors get a searchable, categorized picker; your frontend gets a class name or ready-to-render SVG data.
Works out of the box with the free icon set. Add a Font Awesome API token to unlock your kits and every Pro / Pro+ family your account is licensed for.
https://github.com/user-attachments/assets/be8b4920-8aff-43c7-b12e-e34304093324
user), a class string (fa-solid fa-user), or a JSON object with the SVG geometry.| Plugin | Strapi | Node.js |
|---|---|---|
| 0.x | 5.x | 18 – 22 |
# npm
npm install strapi-plugin-fontawesome-icon
# yarn
yarn add strapi-plugin-fontawesome-iconRestart Strapi (npm run develop). For production, rebuild the admin panel with npm run build.
No private registry or Font Awesome npm token is required — the only Font Awesome dependency is the public @fortawesome/fontawesome-free package.
Nothing to configure. Without an API token, the picker serves the free icon set bundled with the plugin and makes no external requests.
In your Font Awesome account, go to Account → API Tokens and create a token with the svg_icons (or svg_icons_pro) and kits_read scopes.
Add it to your server environment. Never commit it.
# .env
FONTAWESOME_API_TOKEN=your-tokenRestart Strapi, then open Settings → Font Awesome to choose your kit and the packages editors can use.
The defaults work for most projects. To override them, add the plugin to config/plugins.ts (or .js):
export default ({ env }) => ({
'fontawesome-icon': {
config: {
apiToken: env('FONTAWESOME_API_TOKEN'),
pageSize: 250,
concurrency: 5,
},
},
});| Option | Default | Description |
|---|---|---|
apiToken | process.env.FONTAWESOME_API_TOKEN | Font Awesome API token. Leave unset to use the free icon set. |
apiUrl | https://api.fontawesome.com | Font Awesome API base URL. |
pageSize | 250 | Icons fetched per API request when loading a style. |
concurrency | 5 | Parallel requests when loading a style. |
| Format | Example | Best for |
|---|---|---|
| Name only | user | Your own icon mapping or component library |
| Name + type (default) | fa-solid fa-user | Frontends that load Font Awesome CSS or a Kit |
| Full detail object | {"name":"user","family":"classic","style":"solid","prefix":"fa-solid","id":"fa-solid fa-user","label":"User","width":448,"height":512,"path":"M224 256A128…"} | Rendering inline SVG with no Font Awesome runtime |
The field is stored as text, so the object format arrives in API responses as a JSON string. path is a string, or a [secondary, primary] array for duotone icons.
With Font Awesome CSS or a Kit (name + type format):
<i class="fa-solid fa-user" aria-hidden="true"></i>As inline SVG (full detail object format), with no Font Awesome dependency. A React example:
export function FaIcon({ value, title, ...props }) {
const icon = typeof value === 'string' ? JSON.parse(value) : value;
const paths = Array.isArray(icon.path) ? icon.path : [icon.path];
return (
<svg
viewBox={`0 0 ${icon.width} ${icon.height}`}
width="1em"
height="1em"
fill="currentColor"
role={title ? 'img' : undefined}
aria-hidden={title ? undefined : true}
{...props}
>
{title ? <title>{title}</title> : null}
{paths.map((d, i) => (
// Duotone: the first path is the secondary layer.
<path key={i} d={d} opacity={paths.length > 1 && i === 0 ? 0.4 : 1} />
))}
</svg>
);
}A public, read-only route returns the SVG data for a single icon. Use it to back-fill geometry for values stored as a name or class string.
GET /api/fontawesome-icon/resolve?id=fa-solid%20fa-user{
"id": "fa-solid fa-user",
"name": "user",
"label": "User",
"family": "classic",
"style": "solid",
"prefix": "fa-solid",
"width": 448,
"height": 512,
"path": "M224 256A128 128 0 1 0 224 0a128…"
}id accepts a name (user, defaults to Classic Solid) or a class string (fa-sharp fa-solid fa-user). Unknown icons return 204 No Content.
The route returns only public icon geometry — never the token or account data. It checks the server cache first and only calls the Font Awesome API for icons not yet cached. Without a token, it serves the bundled free icons.
Found a vulnerability? Please report it privately via GitHub security advisories rather than opening a public issue.
The picker only shows Classic Solid, Regular and Brands.
No API token is configured, so the free set is in use. Set FONTAWESOME_API_TOKEN and restart Strapi.
Pro families are missing after adding a token.
Enable them in Settings → Font Awesome, and check that the token has the svg_icons_pro and kits_read scopes.
Icons are out of date after changing my kit. Click Clear cache in Settings → Font Awesome.
value too long for type character varying(255) on PostgreSQL.
Fields created by versions before 0.2.1 used a varchar(255) column. The plugin converts these columns to text on startup — upgrade and restart Strapi.
Contributions are welcome. Please open an issue to discuss larger changes first.
git clone https://github.com/OsnielT/strapi-fontawesome-icon-picker.git
cd strapi-fontawesome-icon-picker
npm install
npm run watch:link # develop against a local Strapi app
npm run build # build to dist/
npm run verify # validate the plugin packageSee ARCHITECTURE.md for the code layout.
MIT © Osniel Torres
Font Awesome is a trademark of Fonticons, Inc. This plugin is not affiliated with or endorsed by Fonticons, Inc. or Strapi. Icons are subject to the Font Awesome license.
Share your work with the community and get it listed in the Strapi ecosystem for everyone to discover and use.
Submit
