2017 © Pedro Peláez
 

project fontawesome

Fontawesome icon creation helper

image

fortifi/fontawesome

Fontawesome icon creation helper

  • Thursday, June 14, 2018
  • by bajbnet
  • Repository
  • 1 Watchers
  • 0 Stars
  • 9 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 5 Versions
  • 0 % Grown

The README.md

Font Awesome 5 Icon Wrapper

A PHP wrapper for easy Font Awesome 5 icon creation, (*1)

Example

Create Icon:

By default, FaIcon class gives access to all FontAwesome Pro icons., (*2)

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

For Free icons:

There is a helper class for accessing only free icons, using:, (*3)

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

Create Brand Icon:

Whilst FaIcon::create(); will work for creating Brand icons, the below class static is for improved code readability of developer intent., (*4)

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

Size options:

$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();

Style options (pro only):

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

Transformation options:

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

Multiple flips:, (*5)

$icon->flip(FaFlip::VERTICAL, FaFlip::HORIZONTAL);
Shrink / Grow:
$icon->shrink(10);
$icon->grow(10);

Move:

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

Mask:

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

Animation options:

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

Set tag as span (more semantic than default <i> tag):

$icon->span();

Other options:

$icon->fixedWidth();

```php $icon->border();, (*6)

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

Additional:

Icon object is created using Glimpse., (*7)

Add/remove classes:, (*8)

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

Get Icon Glimpse object and apply custom attributes:, (*9)

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

The Versions

14/06 2018

dev-master

9999999-dev

Fontawesome icon creation helper

  Sources   Download

MIT

The Requires

 

The Development Requires

by Chris Sparshott

composer package fontawesome font awesome font awesome 5 fontawesome 5

13/06 2018

2.0.2

2.0.2.0

Fontawesome icon creation helper

  Sources   Download

dbad

The Requires

 

The Development Requires

by Chris Sparshott

composer package fontawesome font awesome font awesome 5 fontawesome 5

29/03 2018

2.0.1

2.0.1.0

Fontawesome icon creation helper

  Sources   Download

dbad

The Requires

 

The Development Requires

by Chris Sparshott

composer package fontawesome font awesome font awesome 5 fontawesome 5

29/03 2018

2.0.0

2.0.0.0

Fontawesome icon creation helper

  Sources   Download

dbad

The Requires

 

The Development Requires

by Chris Sparshott

composer package fontawesome font awesome font awesome 5 fontawesome 5

12/03 2018

1.0

1.0.0.0

Fontawesome icon creation helper

  Sources   Download

dbad

The Requires

 

The Development Requires

by Chris Sparshott

composer package fontawesome font awesome font awesome 5 fontawesome 5