prihod / moonshine-lucide-icons
Integrates Lucide icons into Moonshine v3.
Installs: 91
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/prihod/moonshine-lucide-icons
Requires
- php: ^8.2
- blade-ui-kit/blade-icons: ^1.8
Requires (Dev)
- ext-fileinfo: *
- friendsofphp/php-cs-fixer: ^3.75
- moonshine/moonshine: ^3.0
- orchestra/testbench: ^10.2
- pestphp/pest: ^3.8
- pestphp/pest-plugin-laravel: ^3.2
- rector/rector: ^2.0
- spatie/phpunit-snapshot-assertions: ^5.1
README
A package for convenient usage of Lucide icons in Laravel and the Moonshine admin panel.
✨ Features
- Full support for Lucide Icons in Moonshine
- 1000+ SVG icons
- Simple usage via Blade components
- Dynamic icon rendering
<x-dynamic-component> - Optional icon caching
- Supports Moonshine v3 and v4
📋 Requirements
- PHP 8.2+
- Laravel 10+
- Moonshine 3.0+ (v4 supported as well)
🚀 Installation
composer require prihod/moonshine-lucide-icons
🔧 Publishing Files
Publish the Blade template icon.blade.php
php artisan vendor:publish --tag=moonshine-lucide-icons-blade
Target path:
resources/views/vendor/moonshine/components/icon.blade.php
🔄 Updating the package
If you update:
prihod/moonshine-lucide-icons- or Moonshine from 3.x → 4.x
run:
php artisan vendor:publish --tag=moonshine-lucide-icons-blade --force
This ensures the icon component matches the current Moonshine version.
🎨 Usage
In Moonshine
Moonshine automatically uses Lucide icons when the requested icon is not available in the default set.
In Blade templates
<x-lucide-activity />
With classes:
<x-lucide-album class="w-6 h-6 text-gray-500" />
With styles:
<x-lucide-anchor style="color: #555" />
With additional attributes:
<x-lucide-alert-circle width="24" height="24" stroke-width="1.5" />
Dynamic icons
@php $icon = 'home'; @endphp <x-dynamic-component component="lucide-{{ $icon }}" class="w-6 h-6" />
🧠 IDE Hints
For icon autocompletion, use:
👉 https://plugins.jetbrains.com/plugin/26121-metastorm
📚 Lucide Documentation
🤝 Contributing
Pull Requests are welcome!