- How do I install mallardduck/blade-lucide-icons in a Laravel app?
- Install it with composer require mallardduck/blade-lucide-icons. The README lists PHP 8.1 or higher and Laravel 8.0 or higher as requirements. For the 2.x line, confirm the current Composer constraints against your app baseline before upgrading.
- How do I use Lucide icons in Laravel Blade views?
- Use self-closing Blade components such as <x-lucide-activity /> in any Blade view. The component compiles to an SVG icon and works in views, mailables, and notifications that render Blade. Icon names map to the Lucide SVG set included by the package.
- Can I add CSS classes or inline styles to Blade Lucide icon components?
- Yes. Pass a class attribute like <x-lucide-album class="w-6 h-6 text-gray-500" /> or an inline style such as <x-lucide-anchor style="color: #555" />. These attributes are applied through the Blade Icons component rendering. You can also set default classes and attributes in the published config.
- How do I publish the Blade Lucide Icons config file?
- Run php artisan vendor:publish --tag=blade-lucide-icons-config. This publishes blade-lucide-icons.php, where you can configure Blade Icons features such as default classes and default attributes. If you are upgrading a major version, publish to a scratch location and diff it against your committed config.
- How do I publish raw Lucide SVG icons as assets?
- Run php artisan vendor:publish --tag=blade-lucide-icons --force to publish the raw SVG files. They are then available under public/vendor/blade-lucide-icons/ and can be referenced with asset('vendor/blade-lucide-icons/cloud-moon.svg'). Use this approach when you need SVG files as standalone assets rather than Blade components.
- Does blade-lucide-icons support Laravel 8 and PHP 8.1?
- The README states PHP 8.1 or higher and Laravel 8.0 or higher. That makes it suitable for modern Laravel Blade applications, including views, mailables, and notifications. Because the package has a 2.x major line, verify the exact PHP, Laravel, and blade-ui-kit/blade-icons constraints in Composer before adopting or upgrading.
- How does caching work with Blade Lucide Icons?
- Blade Lucide Icons uses blade-ui-kit/blade-icons under the hood, so it inherits Blade Icons caching and related features. The package README recommends enabling icon caching with this library. After package or view changes, run php artisan view:clear and php artisan view:cache to avoid stale compiled Blade output.
- Is upgrading from Blade Lucide Icons 1.x to 2.0 safe?
- Treat a move from 1.x to 2.0.x as a major upgrade, not a drop-in minor update. Re-publish and diff the config, confirm component registration and minimum dependency versions, and audit the Lucide 1.23.0 to 1.57.0 changes for icons you use. Pilot the upgrade in a branch and screenshot-diff every icon in your UI before merging.
- Which Lucide icons are available in blade-lucide-icons 2.0.29?
- The package tracks Lucide v1.57.0, and you can browse available icons in the resources/svg directory or preview them at lucide.dev. Release notes for 2.0.29 call out two new icons, but the accumulated Lucide delta since v1.23.0 is much larger. Verify any production icon names against the included set because renames or deprecations can cause missing or changed icons.
- What are alternatives to blade-lucide-icons for Laravel icons?
- Alternatives include using blade-ui-kit/blade-icons with your own SVG set, publishing raw Lucide SVGs and referencing them directly, or using another Laravel icon package. This package is tightly coupled to Blade, so Inertia, some Livewire edge cases, and non-Laravel PHP contexts need raw-SVG workarounds. Choose it when drop-in x-lucide components in Laravel Blade are your priority.