outhebox / blade-feather-icons
A package to easily make use of Feather Icons in your Laravel Blade views.
Requires
- php: ^7.4|^8.0
- blade-ui-kit/blade-icons: ^1.0
- illuminate/support: ^7.14|^8.0
Requires (Dev)
- orchestra/testbench: ^5.0|^6.0
- phpunit/phpunit: ^8.0|^9.0
README
A package to easily make use of Feather Icons in your Laravel Blade views.
For a full list of available icons see the SVG directory or preview them at feathericons.com.
Requirements
- PHP 7.2 or higher
- Laravel 7.14 or higher
Installation
composer require outhebox/blade-feather-icons
Usage
Icons can be used a self-closing Blade components which will be compiled to SVG icons:
<x-feather-alert-triangle/>
You can also pass classes to your icon components:
<x-feather-alert-triangle class="text-primary"/>
And even use inline styles:
<x-feather-alert-triangle style="color: #555"/>
Raw SVG Icons
If you want to use the raw SVG icons as assets, you can publish them using:
php artisan vendor:publish --tag=blade-feather-icons --force
Then use them in your views like:
<img src="{{ asset('vendor/blade-feather-icons/alert-triangle.svg') }}" width="25" height="25"/>
Update your Feather icons to the latest version
Install the feather icons npm library
npm install feather-icons --save
Then copy this line to your webpack.mix file
mix.copy('node_modules/feather-icons/dist/icons', 'public/vendor/feather-icons');
Blade Icons
Blade Feather Icons uses Blade Icons under the hood. Please refer to the Blade Icons readme for additional functionality.
Credits
License
Blade Feather Icons is open-sourced software licensed under the MIT license.