PHP code example of packaged-ui / fontawesome

1. Go to this page and download the library: Download packaged-ui/fontawesome library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

packaged-ui / fontawesome example snippets


$icon = FaIcon::create(FaIcon::COMMENT_SMILE);

$icon = FaIcon::create(FaFreeIcons::ROCKET);

$brandIcon = FaBrandIcon::create(FaBrandIcon::GOOGLE);

$icon->sizeLarge();
$icon->sizeSmall();
$icon->sizeXSmall();

$icon->sizeX1();
$icon->sizeX2();
$icon->sizeX3();
$icon->sizeX4();
$icon->sizeX5();
$icon->sizeX6();
$icon->sizeX7();
$icon->sizeX8();
$icon->sizeX9();
$icon->sizeX10();

$icon->styleRegular();
$icon->styleLight();
$icon->styleSolid();

$icon->flip(FaFlip::VERTICAL);
$icon->flip(FaFlip::HORIZONTAL);

$icon->flip(FaFlip::VERTICAL, FaFlip::HORIZONTAL);

$icon->shrink(10);
$icon->grow(10);

$icon->moveUp(10);
$icon->moveDown(10);
$icon->moveLeft(10);
$icon->moveRight(10);

$icon->mask(FaIcon::PENCIL_ALT, FaStyle::SOLID);

$icon->spin();
$icon->pulse();

$icon->span();

$icon->fixedWidth();

$icon->border();

$icon->pullLeft();
$icon->pullRight();

$icon->addClass('someClass', 'anotherClass');
$icon->removeClass('remveThis', 'andThis');

$icon->glimpse()->setId('uniqueId');
$icon->glimpse()->setAttribute('data-whatever', 'someValue');