Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Icons Laravel Package

artisanpack-ui/icons

Register and use your own SVG icon sets in Laravel with minimal overhead. Integrates with blade-ui-kit/blade-icons and Livewire UI, supports config or event-based registration, and makes it easy to add premium sets like Font Awesome Pro.

View on GitHub
Deep Wiki
Context7

An extensibility layer for Blade Icons that enables flexible registration of custom SVG icon sets via config or events. This package extends Blade Icons by providing developers with flexible mechanisms to register and manage custom SVG icon collections, supporting both configuration-based and event-driven registration approaches.

Frequently asked questions about Icons
How do I install and set up artisanpack-ui/icons in a Laravel 13 project?
Run `composer require artisanpack-ui/icons`, then publish the config with `php artisan vendor:publish --tag=artisanpack-package-config`. Organize your SVGs in `resources/icons/` and define paths/prefixes in `config/artisanpack/icons.php`. No additional dependencies beyond Blade Icons are required.
Can I use this package with Laravel Livewire components?
Yes, the package explicitly supports Livewire UI components. Icons registered via config or events will work seamlessly in dynamic Livewire components, including real-time updates without re-renders.
What Laravel versions and PHP requirements does this package support?
The package is compatible with Laravel 12 and 13 and requires PHP 8.2+. It aligns with Laravel’s LTS support, ensuring long-term stability and security updates.
How do I register custom icon sets dynamically at runtime?
Use the `ap.icons.register-icon-sets` event in a service provider’s `boot()` method. Pass an array of icon set configurations with `path` and `prefix` keys. This is ideal for package developers or dynamic icon loading.
Will this package work with Font Awesome Pro or other premium icon sets?
Absolutely. The package is designed for premium icon sets like Font Awesome Pro. Simply configure the SVG paths in `config/artisanpack/icons.php` and use the `<x-icon-* />` syntax with the set’s prefix.
How does this package handle missing or corrupted SVG files?
The package logs warnings for missing or corrupted SVGs but won’t break your application. Blade templates will render gracefully, and you can customize error handling via the `ap.icons.missing-icon` event.
Can I integrate this with Vite or Laravel Mix for asset optimization?
Yes, SVGs stored in `resources/icons/` are treated as static assets. They’ll be processed by your existing asset pipeline (Vite, Laravel Mix, or static file serving) without additional configuration.
What are the performance implications of registering multiple icon sets?
The package is optimized for performance with lazy-loading SVGs and zero hardcoded icons. Memory overhead remains minimal even with dozens of icon sets, making it ideal for dashboards or admin panels.
How do I avoid icon naming collisions between custom and third-party sets?
Use unique prefixes for each icon set (e.g., `fa`, `hero`, `brand`). The package enforces prefix validation during registration, and the Blade component syntax (`<x-icon-{prefix}-{name} />`) ensures no conflicts.
Are there alternatives to this package for custom SVG icons in Laravel?
Alternatives include hardcoding SVGs in Blade or using standalone packages like `laravel-svg`. However, this package offers a cleaner, more scalable solution with config/event-driven registration, Livewire support, and built-in Blade Icons integration.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
andydefer/laravel-cluster
testo/fiber
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity
christhompsontldr/laravel-inky
spatie/mailcoach-vapor
spatie/laravel-javascript-views