Icons and icon factories

Icon libraries represented here support assistive reading technologies.

Devicons DevIcons icon factory

Devicon v2 library is a set of icons representing programming languages, designing and development tools. These icons are available as fonts and SVG images and they support assistive reading technologies.

DevIcons SVG iconsDevIcons font icons

Icons are loading...

Icons are loading...

Icons are loading...

Font Awesome icons

Font Awesome icons can be used by creating a IconTag or a FontAwesomeIcon object.

FontAwesomeIcon Icon size can be changed simply by calling FontAwesomeIcon::setSize() method with a Font Awesome CSS class (or a short hand version of it by simply removing the fa- from the begining of the size class)

Sizes are:

  • fa-xs - .75em
  • fa-sm - .875em
  • fa-lg - 1.33em, also applies vertical-align: -25%
  • fa-2x through fa-10x - 2em through 10em
Solid icons Regular icons Brand icons

Icons are loading...

Icons are loading...

Icons are loading...

  • PHP code
    1. <?php
    2.  
    3. namespace Sphp\Html\Media\Icons;
    4.  
    5. echo FontAwesome::i('fab fa-creative-commons')->setSize('2x') . " ";
    6. echo FontAwesome::i('fab fa-html5')->setSize('3x') . " ";
    7. echo FontAwesome::i('fab fa-python')->setSize('4x') . " ";
    8. echo FontAwesome::i('fab fa-facebook-square')->setSize('5x') . " ";
    9. echo FontAwesome::i('fab fa-blogger')->setSize('6x') . " ";
    10. echo FontAwesome::i('fab fa-css3')->setSize('7x') . " ";
    11. echo FontAwesome::i('fab fa-npm')->setSize('8x') . " ";
    12. echo FontAwesome::u('fab fa-gulp')->setSize('9x') . " ";
    13. echo FontAwesome::span('fab fa-sass')->setSize('10x') . " ";
    14.  
    15.  
    Highlighted with GeSHi 1.0.9.1
  • Execution result as HTML5 flow

Other icon factories

Filetype icons and SVG country flags

  • PHP code
    1. <?php
    2.  
    3. namespace Sphp\Html\Media\Icons;
    4.  
    5. $fileIcons = new FileIcons('span');
    6. $list = new \Sphp\Html\Lists\Ul();
    7. $list->addCssClass('fa-2x no-bullet');
    8. $list->append(FileIcons::txt("Text file icon"));
    9. $list->append(FileIcons::html());
    10. $list->append(FileIcons::python());
    11. $list->append(FileIcons::video());
    12. $list->append(FileIcons::php("foo.php"));
    13. $list->append(FileIcons::java("Java icon"));
    14. $list->append(FileIcons::js("JavaScript icon"));
    15. $list->append(FileIcons::c("C icon"));
    16. $list->append($fileIcons->cpp("C++ icon"));
    17. echo $list;
    18.  
    Highlighted with GeSHi 1.0.9.1
  • Execution result as HTML5 flow
Country flags Filesystem icons

Icons are loading...

Icon resources

  1. Font Awesome: https://fontawesome.com/
  2. Devicon 2.0: https://konpa.github.io/devicon/
  3. Jam Icons: https://jam-icons.com/
  4. Material Design Icons: https://materialdesignicons.com/