PHPackages                             bugo/fa-icon-builder - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. bugo/fa-icon-builder

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

bugo/fa-icon-builder
====================

Dependency-free PHP toolset to generate Font Awesome icon classes, HTML tags, and collections (Solid/Regular/Brands).

0.5(1mo ago)033MITPHPPHP ^8.2CI passing

Since Jul 28Pushed 1mo agoCompare

[ Source](https://github.com/dragomano/fa-icon-builder)[ Packagist](https://packagist.org/packages/bugo/fa-icon-builder)[ Docs](https://github.com/dragomano/fa-icon-builder)[ RSS](/packages/bugo-fa-icon-builder/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (5)Dependencies (4)Versions (6)Used By (0)

FA Icon Builder
===============

[](#fa-icon-builder)

[![PHP](https://camo.githubusercontent.com/7bffcab80be9e1d83d7ec1e72f01342ea9ea17a26347f9b34a8d4a5ae8b58c48/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d253545382e322d626c75652e7376673f7374796c653d666c6174)](https://camo.githubusercontent.com/7bffcab80be9e1d83d7ec1e72f01342ea9ea17a26347f9b34a8d4a5ae8b58c48/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d253545382e322d626c75652e7376673f7374796c653d666c6174)[![Coverage](https://camo.githubusercontent.com/f89af5791f1e1ada09a96db484d2a00ca26f4e3d43af2bfe5b7a526189e442cd/68747470733a2f2f62616467656e2e6e65742f636f766572616c6c732f632f6769746875622f647261676f6d616e6f2f66612d69636f6e2d6275696c6465722f6d61696e)](https://camo.githubusercontent.com/f89af5791f1e1ada09a96db484d2a00ca26f4e3d43af2bfe5b7a526189e442cd/68747470733a2f2f62616467656e2e6e65742f636f766572616c6c732f632f6769746875622f647261676f6d616e6f2f66612d69636f6e2d6275696c6465722f6d61696e)

[По-русски](README.ru.md)

Description
-----------

[](#description)

Dependency-free PHP toolset to generate Font Awesome icon classes, HTML tags, and collections (Solid/Regular/Brands). Perfect for projects where you need to work with FA icons.

Installation
------------

[](#installation)

```
composer require bugo/fa-icon-builder
```

Usage
-----

[](#usage)

A unique decorator is provided for each icon set:

```
// 'fa-brands fa-windows'
echo BrandsIcon::make('windows');

// 'fa-regular fa-user'
echo RegularIcon::make('user');

// 'fa-solid fa-user'
echo SolidIcon::make('user');
```

If you need support for legacy classes, simply pass `true` as the second parameter:

```
// 'fas fa-user'
echo SolidIcon::make('user', true);
```

Extended example:

```
$icon = Icon::make('user', IconStyle::Solid);

// ''
var_dump(
    $icon
        ->color('text-red-500')
        ->size('2xl')
        ->title('User')
        ->fixedWidth()
        ->ariaHidden()
        ->html()
);
```

Additional classes can be passed via the `addClass` method:

```
$icon = SolidIcon::make('heart');

// ''
var_dump(
    $icon
        ->addClass('fa-beat')
        ->html()
);
```

Additionally, random icon retrieval is available:

```
var_dump(Icon::random());
```

You can retrieve the entire collection with all classes at once:

```
var_dump(Icon::collection());
```

Or a specific collection set:

```
var_dump(Icon::collection(IconStyle::Brands));

var_dump(BrandsIcon::collection());
```

You might also find the `IconBuilder` class useful, which can create an icon by its class:

```
var_dump(IconBuilder::make(Icon::random()));
```

###  Health Score

39

—

LowBetter than 84% of packages

Maintenance92

Actively maintained with recent releases

Popularity8

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~83 days

Total

5

Last Release

52d ago

PHP version history (2 changes)0.1PHP ^8.1

0.5PHP ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/6ef0dd570abdd5696bf5ba391bcd00ed0bb0ac5d1a5654785e8f204d548ddfc0?d=identicon)[Bugo](/maintainers/Bugo)

---

Top Contributors

[![dragomano](https://avatars.githubusercontent.com/u/229402?v=4)](https://github.com/dragomano "dragomano (17 commits)")

---

Tags

fa-iconsfont-awesomeicon-class-helperphp-icon-builderfont-awesomefa iconsphp icon buildericon class helper

###  Code Quality

TestsPest

Static AnalysisRector

### Embed Badge

![Health badge](/badges/bugo-fa-icon-builder/health.svg)

```
[![Health](https://phpackages.com/badges/bugo-fa-icon-builder/health.svg)](https://phpackages.com/packages/bugo-fa-icon-builder)
```

###  Alternatives

[swissup/module-font-awesome

FontAwesome for Magento2

117.3k1](/packages/swissup-module-font-awesome)[thisisbd/silverstripe-fontawesome-iconpickerfield

Font Awesome Icon Picker for SilverStripe 3.1.x based on http://mjolnic.com/fontawesome-iconpicker

123.3k1](/packages/thisisbd-silverstripe-fontawesome-iconpickerfield)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
