Skip to content
wrdxPublic

About

Generate svg icons from heroicons.com with PHP

Resources

Stars

1 star

Watchers

1 watching

Forks

Latest commit

 

History

13 Commits

Folders and files

Repository files navigation

Generate svg icons from heroicons.com with PHP

php 8.1-8.3

Installation

Install the package via composer

composer require wrdx/heroicons

Usage

use Wrdx\Heroicons\Hero;

echo Hero::icon('academic-cap')->svg();

A bit more control

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 the heroicon() helper function

use Wrdx\Heroicons\Enums\Type;

echo heroicon('academic-cap', Type::mini, ['id' => 'my-id']);

Development

Run tests

composer test

Update heroicons.com svg files

composer heroicons:update

About

Generate svg icons from heroicons.com with PHP

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Used by

Contributors

Languages