PHPackages                             codeat3/blade-icon-generation-helpers - 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. codeat3/blade-icon-generation-helpers

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

codeat3/blade-icon-generation-helpers
=====================================

codeat3's helper methods to use in blade-icon generation scripts

1.4.1(3y ago)078.1k↑544.4%220MITPHP

Since Feb 3Pushed 3mo ago1 watchersCompare

[ Source](https://github.com/codeat3/blade-icon-generation-helpers)[ Packagist](https://packagist.org/packages/codeat3/blade-icon-generation-helpers)[ RSS](/packages/codeat3-blade-icon-generation-helpers/feed)WikiDiscussions 0.x Synced yesterday

READMEChangelog (2)Dependencies (6)Versions (17)Used By (20)

Blade Icon Generation Helpers
-----------------------------

[](#blade-icon-generation-helpers)

A helper package to convert the icons to make it compatible to be used with the `blade-icons` package.

### Installation

[](#installation)

```
composer require codeat3/blade-icon-generation-helpers
```

### Usage

[](#usage)

Kindly refer the [Generating Icons](https://github.com/blade-ui-kit/blade-icons#generating-icons) section from [Blade Icons](https://github.com/blade-ui-kit/blade-icons). This Package utilizes the `after` callback to process the icons as per our need.

The `after` callback received 3 arguments `string $icon` - this is the pathname of the icon, `array $config` - the config specified in the `generation.php` &amp; `SplFileInfo $file` - the original icon file instance.

Inside a callback we instantiate our Processor class &amp; use its helper methods to our benefit.

```
$iconProcessor = new IconProcessor($icon, $config, $sourceFile);
```

This `IconProcessor` instance itself does some optimization on its own by default. Minimal usage would be as follows.

```
$iconProcessor = new IconProcessor($icon, $config, $sourceFile);
    $iconProcessor
        ->optimize()
        ->save();
```

The `optimize` method does the following things by default:

- it removes the following attributes from the svg
    - 'width', 'height', 'class', 'style', 'id',
- if in the config provided `is-outline` is set as `true`
    - if `fill` attribute exists - it will updated to `none`
    - if `stroke` attribute exists - it will updated to `currentColor`
- if in the config provided `is-solid` is set as `true`
    - if `fill` attribute exists - it will updated to `currentColor`
- if in the config provided `custom-attributes` is set`
    - it will set the attributes to the svg
- optionally it provides 2 callable methods `pre` &amp; `post`
    - both callback receives the `$svgEL` as the `DOMDocument` - its the DOMDocument instance of the current icon
    - `pre` can be used if you have to perform some operation before Processor does the default processing
    - `post` can be used if you have to perform some operation after Processor does the default processing

The `save` method

###  Health Score

44

—

FairBetter than 90% of packages

Maintenance54

Moderate activity, may be stable

Popularity31

Limited adoption so far

Community25

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 98.1% 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 ~107 days

Recently: every ~98 days

Total

15

Last Release

104d ago

Major Versions

0.3.1 → 1.4.12023-02-27

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/166912?v=4)[Swapnil Sarwe](/maintainers/swapnilsarwe)[@swapnilsarwe](https://github.com/swapnilsarwe)

---

Top Contributors

[![swapnilsarwe](https://avatars.githubusercontent.com/u/166912?v=4)](https://github.com/swapnilsarwe "swapnilsarwe (53 commits)")[![nuernbergerA](https://avatars.githubusercontent.com/u/13331388?v=4)](https://github.com/nuernbergerA "nuernbergerA (1 commits)")

### Embed Badge

![Health badge](/badges/codeat3-blade-icon-generation-helpers/health.svg)

```
[![Health](https://phpackages.com/badges/codeat3-blade-icon-generation-helpers/health.svg)](https://phpackages.com/packages/codeat3-blade-icon-generation-helpers)
```

###  Alternatives

[composer/composer

Composer helps you declare, manage and install dependencies of PHP projects. It ensures you have the right stack everywhere.

29.5k196.2M3.1k](/packages/composer-composer)[craftcms/cms

Craft CMS

3.6k3.6M3.1k](/packages/craftcms-cms)[tempest/framework

The PHP framework that gets out of your way.

2.2k34.4k15](/packages/tempest-framework)[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

751291.4k43](/packages/civicrm-civicrm-core)[spatie/laravel-export

Create a static site bundle from a Laravel app

674146.0k6](/packages/spatie-laravel-export)[shlinkio/shlink

A self-hosted and PHP-based URL shortener application with CLI and REST interfaces

5.1k5.2k](/packages/shlinkio-shlink)

PHPackages © 2026

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