driesvints/blade-icons
Blade Icons lets you use SVG icons in Laravel Blade with simple components and directives. Convert files like camera.svg into or @svg('camera') with easy class/attribute control, and plug in community icon set packages.
Pros:
<x-icon-... />) for clean, reusable icon usage.w-6 h-6), enabling dynamic styling via Tailwind or custom CSS.Cons:
resources/svg (or a custom path), which may not align with microservice architectures or monorepos.composer require, publish config), with minimal boilerplate.view:clear).blade-ui-kit/blade-icons and publish config.<x-icon-home />).w-6 h-6).resources/svg.blade-heroicons).php artisan view:clear).resources/svg, making updates or audits easier.view:clear, config publishing).composer update + cache clearing).resources/svg.<x-icon-name />).Icon [name] not found).| Failure Scenario | Impact | Mitigation |
|---|---|---|
| Missing SVG file | Broken icon rendering | Use @error directives or fallback icons. |
| Blade cache corruption | Stale icons or errors | Implement php artisan view:clear in CI/CD. |
| Icon set dependency conflicts | Build failures | Pin versions in composer.json. |
| CSS class conflicts | Incorrect icon sizing/colors | Use unique BEM-like classes (e.g., icon--home). |
| Overuse of dynamic icons | Increased Blade rendering time | Limit dynamic icons; use static SVGs where possible. |
<x-icon-... /> vs @svg directives).How can I help you explore Laravel packages today?