blade-ui-kit/blade-icons
Use SVG icons in Laravel Blade with simple components and directives. Convert SVG files into <x-icon-... /> tags or @svg() calls, add classes/attributes easily, and plug in many third‑party icon set packages for quick, consistent icons across your app.
Pros:
<x-icon-camera />), fitting Laravel’s Blade component ecosystem (e.g., Livewire, Inertia.js).Cons:
@vite, @mix).<x-icon-* />) require unique namespacing to avoid conflicts with other Blade components.w-6 h-6) for consistent sizing.resources/svg and publishing the config.blade-heroicons). Dependency sprawl risk if overused.@once directives).aria-hidden) needed for icons? How will screen readers handle SVG icons?mask-image or a backup font)?composer require blade-ui-kit/blade-icons
resources/svg directory:
php artisan vendor:publish --tag=blade-icons
blade-heroicons) as needed.<x-icon-* /> components in Blade files.@svg('icon-name', 'classes') for direct replacements.fill-current).@vite directives).@svg('name', 'classes') works in all Blade templates.@icon) can be added for shorthand.<x-app-icon-camera />).currentColor vs. hardcoded colors).!important in icon-related styles to maintain overrideability.<x-icon-{{ $dynamicIcon }} class="w-6 h-6" />
resources/svg, making it easy to update or replace sets.composer update + config tweaks).resources/svg directory.php artisan view:clear or @once directives).resources/svg and the config is published.fill vs. currentColor).How can I help you explore Laravel packages today?