PHPackages                             efureev/yii2-fontawesome - 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. efureev/yii2-fontawesome

AbandonedArchivedYii2-extension[Utility &amp; Helpers](/categories/utility)

efureev/yii2-fontawesome
========================

Asset Bundle for Yii2 with Font Awesome

2.18.0(9y ago)013[1 PRs](https://github.com/efureev/yii2-fontawesome/pulls)MITPHPPHP &gt;=5.4.0

Since Feb 27Pushed 5y ago1 watchersCompare

[ Source](https://github.com/efureev/yii2-fontawesome)[ Packagist](https://packagist.org/packages/efureev/yii2-fontawesome)[ RSS](/packages/efureev-yii2-fontawesome/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (4)Dependencies (2)Versions (51)Used By (0)

Yii 2 [Font Awesome](http://fortawesome.github.io/Font-Awesome/) Asset Bundle
=============================================================================

[](#yii-2-font-awesome-asset-bundle)

This extension provides a assets bundle with [Font Awesome](http://fortawesome.github.io/Font-Awesome/)for [Yii framework 2.0](http://www.yiiframework.com/) applications and helper to use icons.

For license information check the [LICENSE](https://github.com/efureev/yii2-fontawesome/blob/master/LICENSE)-file.

[![License](https://camo.githubusercontent.com/d929cab47e0029b0e3f3599e855129448ba382a51166924ce45150876edc298a/68747470733a2f2f706f7365722e707567782e6f72672f656675726565762f796969322d666f6e74617765736f6d652f6c6963656e73652e737667)](https://packagist.org/packages/efureev/yii2-fontawesome)[![Latest Stable Version](https://camo.githubusercontent.com/caf81923bee8cee30ac4fc85aaeabab480b51f7060cde960199865072f13e475/68747470733a2f2f706f7365722e707567782e6f72672f656675726565762f796969322d666f6e74617765736f6d652f762f737461626c652e737667)](https://packagist.org/packages/efureev/yii2-fontawesome)[![Latest Unstable Version](https://camo.githubusercontent.com/090058786c36acbd84480cff1ff71997ae71dcb158bb27a6f95b0d60be15df11/68747470733a2f2f706f7365722e707567782e6f72672f656675726565762f796969322d666f6e74617765736f6d652f762f756e737461626c652e737667)](https://packagist.org/packages/efureev/yii2-fontawesome)[![Total Downloads](https://camo.githubusercontent.com/8b9713238a66356a6c2a3a6d05c4a0f264cc6262961723287fb5b8f38220d8cc/68747470733a2f2f706f7365722e707567782e6f72672f656675726565762f796969322d666f6e74617765736f6d652f646f776e6c6f6164732e737667)](https://packagist.org/packages/efureev/yii2-fontawesome)

Code Status
-----------

[](#code-status)

[![Scrutinizer Code Quality](https://camo.githubusercontent.com/55c21b454926987d830a98ce6a170b01d696d06ad930bb31f65874112657b221/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f656675726565762f796969322d666f6e74617765736f6d652f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/efureev/yii2-fontawesome/?branch=master)[![Code Coverage](https://camo.githubusercontent.com/4797dfd6b34fe1e7bc0580c80f20073ff35311b763b901cb4c0c26dae456d17c/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f656675726565762f796969322d666f6e74617765736f6d652f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/efureev/yii2-fontawesome/?branch=master)[![Travis CI Build Status](https://camo.githubusercontent.com/c947817b9fc26804dc6d7087c0b3838846e61af87aec480f1c6e094eb8d693d9/68747470733a2f2f7472617669732d63692e6f72672f656675726565762f796969322d666f6e74617765736f6d652e737667)](https://travis-ci.org/efureev/yii2-fontawesome)

Support
-------

[](#support)

- [GutHub issues](https://github.com/efureev/yii2-fontawesome/issues)
- [Public chat](https://gitter.im/efureev/support)

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

[](#installation)

The preferred way to install this extension is through [composer](https://getcomposer.org/).

Either run

```
composer require "efureev/yii2-fontawesome:~2"
```

or add

```
"efureev/yii2-fontawesome": "~2",

```

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

Usage
-----

[](#usage)

In view

```
efureev\fontawesome\AssetBundle::register($this);
```

or as dependency in your main application asset bundle

```
class AppAsset extends AssetBundle
{
	// ...

	public $depends = [
		// ...
		'\efureev\fontawesome\AssetBundle'
	];
}
```

Class reference
---------------

[](#class-reference)

Namespace: `efureev\fontawesome`;

\###Class `FA` or `FontAwesome`

- `static FA::icon($name, $options=[])` - Creates an [`components\Icon`](#class-componenticon-icon) that can be used to FontAwesome html icon
    - `$name` - name of icon in font awesome set.
    - `$options` - additional attributes for `i.fa` html tag.
- `static FA::stack($name, $options=[])` - Creates an [`components\Stack`](#class-componentstack-stack) that can be used to FontAwesome html icon
    - `$options` - additional attributes for `span.fa-stack` html tag.

\###Class `components\Icon` (`$Icon`)

- `(string)$Icon` - render icon
- `$Icon->render()` - render icon
- `$Icon->tag($value)` - set another html tag for icon (default `i`)
    - `$value` - name of tag
- `$Icon->addCssClass($value)` - add to html tag css class in `$value`
    - `$value` - name of css class
- `$Icon->inverse()` - add to html tag css class `fa-inverse`
- `$Icon->spin()` - add to html tag css class `fa-spin`
- `$Icon->fixedWidth()` - add to html tag css class `fa-fw`
- `$Icon->ul()` - add to html tag css class `fa-ul`
- `$Icon->li()` - add to html tag css class `fa-li`
- `$Icon->border()` - add to html tag css class `fa-border`
- `$Icon->pullLeft()` - add to html tag css class `pull-left`
- `$Icon->pullRight()` - add to html tag css class `pull-right`
- `$Icon->size($value)` - add to html tag css class with size
    - `$value` - size value (variants: `FA::SIZE_LARGE`, `FA::SIZE_2X`, `FA::SIZE_3X`, `FA::SIZE_4X`, `FA::SIZE_5X`)
- `$Icon->rotate($value)` - add to html tag css class with rotate
    - `$value` - rotate value (variants: `FA::ROTATE_90`, `FA::ROTATE_180`, `FA::ROTATE_270`)
- `$Icon->flip($value)` - add to html tag css class with rotate
    - `$value` - flip value (variants: `FA::FLIP_HORIZONTAL`, `FA::FLIP_VERTICAL`)

\###Class `components\Stack` (`$Stack`)

- `(string)$Stack` - render icon stack
- `$Stack->render()` - render icon stack
- `$Stack->tag($value)` - set another html tag for icon stack (default `span`)
- `$Stack->icon($icon, $options=[])` - set icon for stack
    - `$icon` - name of icon or `component\Icon` object
    - `$options` - additional attributes for icon html tag.
- `$Stack->icon($icon, $options=[])` - set background icon for stack
    - `$icon` - name of icon or `component\Icon` object
    - `$options` - additional attributes for icon html tag.

Helper examples
---------------

[](#helper-examples)

```
use efureev\fontawesome\FA;

// normal use
echo FA::icon('home'); //

// shortcut
echo FA::i('home'); //

// icon with additional attributes
echo FA::icon(
    'arrow-left',
    ['class' => 'big', 'data-role' => 'arrow']
); //

// icon in button
echo Html::submitButton(
    Yii::t('app', '{icon} Save', ['icon' => FA::icon('check')])
); //  Save

// icon with additional methods
echo FA::icon('cog')->inverse();    //
echo FA::icon('cog')->spin();       //
echo FA::icon('cog')->fixedWidth(); //
echo FA::icon('cog')->ul();         //
echo FA::icon('cog')->li();         //
echo FA::icon('cog')->border();     //
echo FA::icon('cog')->pullLeft();   //
echo FA::icon('cog')->pullRight();  //

// icon size
echo FA::icon('cog')->size(FA::SIZE_3X);
// values: FA::SIZE_LARGE, FA::SIZE_2X, FA::SIZE_3X, FA::SIZE_4X, FA::SIZE_5X
//

// icon rotate
echo FA::icon('cog')->rotate(FA::ROTATE_90);
// values: FA::ROTATE_90, FA::ROTATE_180, FA::ROTATE_180
//

// icon flip
echo FA::icon('cog')->flip(FA::FLIP_VERTICAL);
// values: FA::FLIP_HORIZONTAL, FA::FLIP_VERTICAL
//

// icon with multiple methods
echo FA::icon('cog')
        ->spin()
        ->fixedWidth()
        ->pullLeft()
        ->size(FA::SIZE_LARGE);
//

// icons stack
echo FA::stack()
        ->icon('twitter')
        ->on('square-o');
//
//
//
//

// icons stack with additional attributes
echo FA::stack(['data-role' => 'stacked-icon'])
     ->on(FA::Icon('square')->inverse())
     ->icon(FA::Icon('cog')->spin());
//
//
//
//

// unordered list icons
echo FA::ul(['data-role' => 'unordered-list'])
     ->item('circle', 'Bullet item')
     ->item('check', 'Checked item');
//
//   Bullet item
//   Checked Item
//

// autocomplete icons name in IDE
echo FA::icon(FA::_COG);
echo FA::icon(FA::_DESKTOP);
echo FA::stack()
     ->on(FA::_CIRCLE_O)
     ->icon(FA::_TWITTER);
```

### Set another prefix

[](#set-another-prefix)

```
FA::$cssPrefix = 'awf';

echo FA::icon('home');
//
echo FA::icon('cog')->inverse();
//
```

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity71

Established project with proven stability

 Bus Factor1

Top contributor holds 92.1% 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 ~19 days

Recently: every ~3 days

Total

49

Last Release

3530d ago

Major Versions

1.2.1 → 2.0.02014-06-05

### Community

Maintainers

![](https://www.gravatar.com/avatar/62a6e061d1ccab4d5de8dcba717b7634f91e4842b32ca26420b8261c66104bf7?d=identicon)[efureev](/maintainers/efureev)

---

Top Contributors

[![rmrevin](https://avatars.githubusercontent.com/u/803507?v=4)](https://github.com/rmrevin "rmrevin (139 commits)")[![efureev](https://avatars.githubusercontent.com/u/5524684?v=4)](https://github.com/efureev "efureev (4 commits)")[![albertborsos](https://avatars.githubusercontent.com/u/7307145?v=4)](https://github.com/albertborsos "albertborsos (2 commits)")[![haqqi](https://avatars.githubusercontent.com/u/831763?v=4)](https://github.com/haqqi "haqqi (1 commits)")[![marc7000](https://avatars.githubusercontent.com/u/1118837?v=4)](https://github.com/marc7000 "marc7000 (1 commits)")[![mauriziocingolani](https://avatars.githubusercontent.com/u/4015015?v=4)](https://github.com/mauriziocingolani "mauriziocingolani (1 commits)")[![mervick](https://avatars.githubusercontent.com/u/2429298?v=4)](https://github.com/mervick "mervick (1 commits)")[![oudingfan](https://avatars.githubusercontent.com/u/2810552?v=4)](https://github.com/oudingfan "oudingfan (1 commits)")[![Faryshta](https://avatars.githubusercontent.com/u/2029247?v=4)](https://github.com/Faryshta "Faryshta (1 commits)")

---

Tags

bundleyii2assetfontawesome

### Embed Badge

![Health badge](/badges/efureev-yii2-fontawesome/health.svg)

```
[![Health](https://phpackages.com/badges/efureev-yii2-fontawesome/health.svg)](https://phpackages.com/packages/efureev-yii2-fontawesome)
```

###  Alternatives

[rmrevin/yii2-fontawesome

Asset Bundle for Yii2 with Font Awesome

1474.0M134](/packages/rmrevin-yii2-fontawesome)[asinfotrack/yii2-toolbox

Yii2-Toolbox is a collection of useful helpers, widgets etc. extending the basic functionality of Yii2

1230.5k5](/packages/asinfotrack-yii2-toolbox)

PHPackages © 2026

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