PHPackages                             wrdx/heroicons - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. wrdx/heroicons

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

wrdx/heroicons
==============

Generate svg icons from heroicons.com with PHP

v1.0.4(1y ago)110MITPHPPHP ^8.1

Since Feb 4Pushed 1y ago1 watchersCompare

[ Source](https://github.com/WrDX/heroicons)[ Packagist](https://packagist.org/packages/wrdx/heroicons)[ RSS](/packages/wrdx-heroicons/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (3)Versions (6)Used By (0)

Generate svg icons from heroicons.com with PHP
==============================================

[](#generate-svg-icons-from-heroiconscom-with-php)

[![php 8.1-8.3](https://camo.githubusercontent.com/650119823341a5612dc1a9ec83fed5bcce5ae2ab1dd46f5111fbd1d44f074f45/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d382e31253743382e32253743382e332d3737376262332e7376673f6c6f676f3d706870266c6f676f436f6c6f723d7768697465)](https://camo.githubusercontent.com/650119823341a5612dc1a9ec83fed5bcce5ae2ab1dd46f5111fbd1d44f074f45/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d382e31253743382e32253743382e332d3737376262332e7376673f6c6f676f3d706870266c6f676f436f6c6f723d7768697465)

Installation
------------

[](#installation)

Install the package via composer

```
composer require wrdx/heroicons
```

Usage
-----

[](#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
-----------

[](#development)

Run tests

```
composer test
```

Update heroicons.com svg files

```
composer heroicons:update
```

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance38

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~72 days

Total

5

Last Release

544d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/859d7b2c5a173ec63122e3520c23b70f8def7c1bcc327107873fe952cdf938e2?d=identicon)[WrDX](/maintainers/WrDX)

---

Top Contributors

[![wrdx](https://avatars.githubusercontent.com/u/3046705?v=4)](https://github.com/wrdx "wrdx (13 commits)")

---

Tags

svgHeroicons

###  Code Quality

TestsPest

### Embed Badge

![Health badge](/badges/wrdx-heroicons/health.svg)

```
[![Health](https://phpackages.com/badges/wrdx-heroicons/health.svg)](https://phpackages.com/packages/wrdx-heroicons)
```

###  Alternatives

[components/flag-icon-css

A curated collection of all country flags in SVG — plus the CSS for easier integration.

12.0k1.6M23](/packages/components-flag-icon-css)[twbs/bootstrap-icons

Official open source SVG icon library for Bootstrap

7.9k2.0M56](/packages/twbs-bootstrap-icons)[simple-icons/simple-icons

SVG icons for popular brands

24.8k194.2k4](/packages/simple-icons-simple-icons)[rinvex/countries

Rinvex Countries is a simple and lightweight package for retrieving country details with flexibility. A whole bunch of data including name, demonym, capital, iso codes, dialling codes, geo data, currencies, flags, emoji, and other attributes for all 250 countries worldwide at your fingertips.

1.7k7.4M48](/packages/rinvex-countries)[kartik-v/bootstrap-star-rating

A simple yet powerful JQuery star rating plugin for Bootstrap.

1.1k4.5M5](/packages/kartik-v-bootstrap-star-rating)[lipis/flag-icons

A curated collection of all country flags in SVG — plus the CSS for easier integration.

12.0k27.5k4](/packages/lipis-flag-icons)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
