- How do I install afatmustafa/blade-hugeicons in a Laravel app?
- Run composer require afatmustafa/blade-hugeicons, then use icons in any Blade view as self-closing components such as <x-hugeicons-youtube/>. You need PHP 8.1 or higher and Laravel 10, 11, 12, or 13. Optionally publish the config file with php artisan vendor:publish --tag=blade-hugeicons-config if you want default classes or attributes.
- Which Laravel and PHP versions does Blade Hugeicons support?
- The package requires PHP 8.1+ and supports Laravel 10, 11, 12, and 13. In practice the main constraint is Composer resolving your existing blade-icons and illuminate/support versions alongside the package. Run the install in a branch and verify the dependency solve before rolling it into a large codebase.
- How do I use a Hugeicons icon inside a Blade template?
- Use a self-closing Blade component like <x-hugeicons-youtube/>, which compiles to an inline SVG. The package bundles 6,200+ icons from Hugeicons Free v4.2.2, named after their SVG files, so you replace youtube with the icon name you need. The full list is in the resources/svg directory or on hugeicons.com.
- How do I change an icon's size, color, or stroke-width?
- Pass CSS classes for sizing and color, for example class="w-6 h-6 text-gray-500", or use a style attribute for inline CSS. Stroke width can be set with stroke-width="1.5", a class like stroke-2, or a style rule such as stroke-width: 2px. Any standard SVG attribute also passes through to the rendered tag.
- Should I enable Blade Icons caching with this package?
- Yes, Blade Icons caching is recommended because it avoids resolving and compiling icon SVGs on every request. Enable it following the Blade Icons documentation and clear the cache as part of your deploy process. Be careful that caching does not mask renamed or missing icons after a Hugeicons upgrade.
- How do I publish the blade-hugeicons config file or the raw SVGs?
- Run php artisan vendor:publish --tag=blade-hugeicons-config to publish blade-hugeicons.php, where you can define default classes and default attributes. You can also publish the raw SVG files if you prefer serving static assets instead of compiling components at runtime. If you publish SVGs, treat that step as a release artifact and avoid --force overwrites without review.
- Are Hugeicons free icons licensed for commercial use in Laravel projects?
- The afatmustafa/blade-hugeicons package code is MIT licensed, but the Hugeicons icon assets may carry separate terms, so confirm the license with legal before commercial redistribution or CDN use. The package only bundles the free Hugeicons set and does not include Hugeicons Pro. Teams needing Pro icons must plan a separate integration path.
- Does this package work with Livewire, admin panels, and other Blade Icons packages?
- It fits server-rendered Laravel apps well, including Livewire components, admin panels, and Blade marketing sites, because icons are just Blade components. It is a poor fit for React, Vue, or Angular SPAs, where the native Hugeicons packages are more natural. It can coexist with other Blade Icons sets, but keep the x-hugeicons-* prefix to avoid naming collisions.
- Why are some Hugeicons blank or missing after upgrading to v2?
- Version 2.0.0 moved to Hugeicons Free v4 and warns that some icon names were renamed or removed upstream. Version 2.0.1 fixed blank icons caused by incomplete v4 path attributes. When upgrading from v1, audit every svg('hugeicons-...') and <x-hugeicons-.../> reference against the new resources/svg directory and visually verify each icon.
- How actively maintained is afatmustafa/blade-hugeicons, and what if it is abandoned?
- It is effectively a single-maintainer wrapper with modest public adoption, so treat it as a time-boxed spike rather than a guaranteed long-term dependency. Pin a known-good version such as ^2.0.1 and be prepared to fork or vendor the package if releases stop. The underlying blade-ui-kit/blade-icons dependency is well known, which lowers the risk of replacing the wrapper later.