Fork me on GitHub

Mesour Icon

Icon component

Packagist

  • Font Awesome (in default, can change) 4.5+ Download

Installation

Suggests

  • None

Demo

Usage

$icon = new \Mesour\UI\Icon;
$icon->setType('user');
echo $icon->render();

Output

<span class="fa fa-user" style="font-size:72px"></span>

Set custom prefix

Info Default is used fa fa- prefix for Font Awesome icons
$icon = new \Mesour\UI\Icon;
$icon->setPrefix('glyphicon glyphicon-');
// setType, etc...

Defaults

protected $defaults = [
    self::WRAPPER => [
        'el' => 'span',
        'attributes' => [
            'class' => ''
        ]
    ],
];