blade-ui-kit/blade-heroicons
Use Heroicons in Laravel Blade via simple SVG components. Supports passing classes/attributes, configuration through Blade Icons (defaults, caching), and works with PHP 8+ and Laravel 9+. Browse icons in the bundled SVGs or on heroicons.com.
Pros:
<x-heroicon-o-arrow-left/>), promoting clean, modular, and maintainable UI code.Cons:
Low Effort for Basic Use:
composer require blade-ui-kit/blade-heroicons), and basic usage (e.g., <x-heroicon-o-arrow-left/>) requires minimal changes to existing Blade templates.Advanced Customization:
php artisan vendor:publish --tag=blade-heroicons-config) enables global defaults (e.g., default classes, attributes) for all icons, which can reduce boilerplate in templates.php artisan vendor:publish --tag=blade-heroicons --force) allows for direct use of SVG files in non-Blade contexts (e.g., JavaScript or CSS).Compatibility:
Minimal Risk for Basic Adoption:
Potential Risks:
Templating Strategy:
Icon Usage Scope:
Customization Needs:
Dependency Management:
Design System Alignment:
Performance Considerations:
Future-Proofing:
Primary Fit:
Secondary Fit:
Non-Fit:
composer require blade-ui-kit/blade-heroicons
php artisan vendor:publish --tag=blade-heroicons-config
config/blade-heroicons.php (e.g., default classes, attributes).php artisan vendor:publish --tag=blade-heroicons --force
{{ asset('vendor/blade-heroicons/o-arrow-left.svg') }}).<!-- Before: Inline SVG or font icon -->
<svg class="w-6 h-6 text-gray-500" ...></svg>
<!-- After: Blade Heroicons -->
<x-heroicon-o-arrow-left class="w-6 h-6 text-gray-500"/>
@svg directive for dynamic icon rendering:
@svg('heroicon-o-arrow-left', 'w-6 h-6', ['style' => 'color: #555'])
How can I help you explore Laravel packages today?