PHP code example of wrdx / heroicons
1. Go to this page and download the library: Download wrdx/heroicons 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/ */
wrdx / heroicons example snippets
use Wrdx\Heroicons\Hero;
echo Hero::icon('academic-cap')->svg();
use Wrdx\Heroicons\Hero;
use Wrdx\Heroicons\Enums\Type;
$icon = new Hero('academic-cap');
$icon->type(Type::micro);
$icon->class('my-class', 'my-second-class');
$icon->attr('id','my-id');
echo $icon->svg();
use Wrdx\Heroicons\Enums\Type;
echo heroicon('academic-cap', Type::mini, ['id' => 'my-id']);