PHPackages                             rsmike/fa - 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. rsmike/fa

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

rsmike/fa
=========

The best Font Awesome helper library for PHP

1.4.1(8y ago)02191MITPHP

Since Aug 15Pushed 8y ago1 watchersCompare

[ Source](https://github.com/rsmike/fa)[ Packagist](https://packagist.org/packages/rsmike/fa)[ RSS](/packages/rsmike-fa/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependencies (1)Versions (8)Used By (1)

PHP Font awesome
================

[](#php-font-awesome)

Awesome PHP Font Awesome library.

Includes PHPDoc autocomplete supported by most IDEs.

Usage
-----

[](#usage)

#### Icon only

[](#icon-only)

`echo FA::check();` generates ` Submit`

*Note a space between icon and wording.*

> Caveat: if your wording is basically a number, you should explicitly convert it to string first, e.g. `FA::briefcase((string)$id)`. Otherwise, number value will be parsed as options parameter.

#### Icon with additional padding class

[](#icon-with-additional-padding-class)

`echo FA::check('Submit')->pad();` generates ``

> Possible options are: `FA_PULL_LEFT`, `FA_PULL_RIGHT`, `FA_SIZE_LG`, `FA_SIZE_2X`, `FA_SIZE_3X`, `FA_SIZE_4X`, `FA_SIZE_5X`, `FA_FIX_WIDTH`, `FA_INVERSE`, `FA_BORDER`, `FA_SPIN`, `FA_PULSE`, `FA_ROT90`, `FA_ROT180`, `FA_ROT270`, `FA_FLIP_V`, `FA_FLIP_H`;

#### Icon with wording and options

[](#icon-with-wording-and-options)

`echo FA::check('Submit', FA::FA_ROT90);`

> Options should go as a second parameter. If the first parameter is not a string, it considered to be options and the second parameter is ignored.

#### Icon with additional custom class

[](#icon-with-additional-custom-class)

`echo FA::check('Submit', FA::FA_ROT90)->class('text-danger my-class');` generates ` Submit`

*Class applies to the icon itself (not the wording)*

#### Icon with Bootstrap-compatible tooltip

[](#icon-with-bootstrap-compatible-tooltip)

`echo FA::exclamation_triangle()->tooltip('Data not verified');` generates ``

#### Icon with additional CSS style

[](#icon-with-additional-css-style)

`echo FA::check()->css('margin-left: 20px');` generates ``

#### Applying modifiers after construction

[](#applying-modifiers-after-construction)

`echo FA::check('Submit')->mod(FA::FA_ROT90);` generates ` Submit`

#### Using icon as an object

[](#using-icon-as-an-object)

```
$ok = FA::check();
$ko = clone $ok;

$ok->class('text-danger');
$ko->mod(FA_FLIP_H);

echo $ok, $ko;

```

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

[](#installation)

Either run

```
$ composer require rsmike/fa:~1.0
```

or add

```
"rsmike/fa": "~1.0"

```

to the `require` section of your `composer.json` file.

"fortawesome/font-awesome" package is a dependency and will be installed automatically.

### Changelog

[](#changelog)

##### v1.4

[](#v14)

- Setting any additional attribute via "att" method
- Custom tooltip position and container
- `style()` renamed to `css()`

##### v1.2

[](#v12)

- Custom padding class for use inside links instead of space symbol

##### v1.1

[](#v11)

- Bootstrap tooltip functionality

##### v1.0

[](#v10)

- Initial public version
- FA icons 4.7

### TODO

[](#todo)

- stacking support
- list icons

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity68

Established project with proven stability

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 ~20 days

Total

7

Last Release

3073d ago

Major Versions

0.3.4 → 1.02017-09-02

### Community

Maintainers

![](https://www.gravatar.com/avatar/8ad20ee9b6a35d398aca3ca4cc3b802786991cb00630562ce45209478dfbc468?d=identicon)[rsmike](/maintainers/rsmike)

---

Tags

phpfont-awesomefa

### Embed Badge

![Health badge](/badges/rsmike-fa/health.svg)

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

###  Alternatives

[imanghafoori/laravel-anypass

A minimal yet powerful package to help you in development.

21421.6k](/packages/imanghafoori-laravel-anypass)

PHPackages © 2026

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