Simple Font Awesome helper for Yii2
Clone or download
Type Name Latest commit message Commit time
Failed to load latest commit information.
FontAwesome.php wip Nov 3, 2015
FontAwesomeAsset.php Update FontAwesomeAsset.php May 2, 2017 Init Nov 28, 2014
composer.json Update composer.json Nov 3, 2015

Font Awesome helper for Yii2

Font Awesome helper for Yii2.


The preferred way to install this helper is through composer.

Either run

php composer.phar require "iutbay/yii2-fontawesome" "*"

or add

"iutbay/yii2-fontawesome" : "*"

to the require section of your application's composer.json file.


To include Font Awesome assets, you should register it in view :


Or as dependency in your app asset bundle :

public $depends = [


use iutbay\yii2fontawesome\FontAwesome as FA;

// home icon : <i class="fa fa-home"></i>
echo FA::icon('home');

// 2x home icon : <i class="fa fa-home fa-2x"></i>
echo FA::icon('home 2x');

// fixed width home icon : <i class="fa fa-home fa-fw"></i>
echo FA::icon('home fw');