wireui/heroicons
Laravel package that brings Heroicons to WireUI, providing ready-to-use SVG icon components you can drop into your Blade views and WireUI components for consistent, customizable icons across your app.
@heroicon) to embed Heroicons directly into templates. This aligns perfectly with Laravel’s component-based architecture, where reusable UI elements (e.g., buttons, modals) are often built with Blade components.h-6 w-6). This reduces CSS overhead and ensures visual consistency with existing Tailwind-based designs.@heroicon('solid/star') syntax, which is intuitive and reduces boilerplate.composer.json and package.json (e.g., "@heroicons/tailwind": "^2.0").npm run dev and npm run build after installation.README.md or design system docs and test thoroughly.optimizeDeps.include) and critical CSS extraction for above-the-fold icons.@heroicon directives be used directly in views, or will they be wrapped in custom components for reusability?@heroicons/react instead).tailwind.config.js exists).composer require wireui/heroicons
npm install @heroicons/tailwind # If not already present
tailwind.config.js to include WireUI’s plugin:
module.exports = {
plugins: [
require('wireui/tailwind'), // Add WireUI plugin
// Other plugins...
],
};
@heroicon directive in Blade templates:
@heroicon('solid/check-circle', class="h-6 w-6 text-green-500")
For solid, outline, and mini variants:
@heroicon('solid/user')
@heroicon('outline/user')
@heroicon('mini/user')
| Dependency | Version Support | Notes |
|---|---|---|
| Laravel | 9+ (tested up to 11) | PHP 8.0+ required. |
| Tailwind CSS | v3+ (v2 may work but untested) | Official support for v3+. |
| PHP | 8.0+ | Laravel 9+ requirement. |
| Node.js | 14+ | For npm/yarn package management. |
| Laravel Mix/Vite | Latest stable | No additional config needed. |
@heroicon directives in shared components.wireui/heroicons and @heroicons/tailwind for updates via:
composer update wireui/heroicons
npm update @heroicons/tailwind
README.md under /resources/docs.tailwind.config.js).theme: {
extend: {
colors: {
'icon-primary': '#3b82f6', // Custom icon color
},
},
},
@heroicon in custom components, maintain a registry of reusable icon components (e.g., resources/views/components/Icons/Success.blade.php).| Issue | Debug Steps | Solution |
|---|---|---|
| Icons not rendering | Check Blade syntax (`@ |
How can I help you explore Laravel packages today?