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

ActiveLibrary

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

Helper classes to get FontAwesome icons html code

0.9(3mo ago)1361MITPHPPHP ^8.1CI passing

Since Mar 5Pushed 3mo 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 1mo ago

READMEChangelog (9)Dependencies (3)Versions (10)Used By (0)

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

[](#fontawesome-php-helper)

[![PHP](https://camo.githubusercontent.com/0d95d447e321b5bdec3fb1505898602f6b4a9aa0bbb0e8c7aa21da1e91046697/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d253545382e312d626c75652e7376673f7374796c653d666c6174)](https://camo.githubusercontent.com/0d95d447e321b5bdec3fb1505898602f6b4a9aa0bbb0e8c7aa21da1e91046697/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d253545382e312d626c75652e7376673f7374796c653d666c6174)[![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:

```
