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

v1.1.0 2025-11-18 22:05 UTC

This package is auto-updated.

Last update: 2025-12-01 16:34:32 UTC


README

A package for convenient usage of Lucide icons in Laravel and the Moonshine admin panel.

Packagist Version PHP Version Laravel Version Moonshine Version

✨ 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

👉 https://lucide.dev/icons/

🤝 Contributing

Pull Requests are welcome!