PHPackages                             bugo/fa-php-helper - 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-php-helper

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

bugo/fa-php-helper
==================

Helper classes to get FontAwesome icons html code

1.0(1w ago)1361MITPHPPHP ^8.2CI passing

Since Mar 5Pushed 1w ago1 watchersCompare

[ Source](https://github.com/dragomano/fa-php-helper)[ Packagist](https://packagist.org/packages/bugo/fa-php-helper)[ Docs](https://github.com/dragomano/fa-php-helper)[ RSS](/packages/bugo-fa-php-helper/feed)WikiDiscussions main Synced yesterday

READMEChangelog (10)Dependencies (6)Versions (11)Used By (0)

FontAwesome PHP Helper
======================

[](#fontawesome-php-helper)

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

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

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

[](#description)

This package is designed to generate HTML code for FontAwesome 7 icons. The following features are available:

- add icon colors
- resize icons
- support for both modern (`fa-solid fa-`) and deprecated (`fas fa-`) classes.
- optionally add the `aria-hidden="true"` attribute to hide icons from screen readers, etc.
- get CSS class of a random icon
- collection of CSS classes of all icons

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

[](#installation)

```
composer require bugo/fa-php-helper
```

Usage
-----

[](#usage)

If only CSS classes are needed:

```
