A package to easily make use of Feather Icons in your Laravel Blade views.
brunocfalcao/blade-feather-icons is a Laravel package for a package to easily make use of feather icons in your laravel blade views..
It currently has 36 GitHub stars and 766.896 downloads on Packagist (latest version v6.0.1).
Install it with composer require brunocfalcao/blade-feather-icons.
Discover more Laravel packages by brunocfalcao
or browse all Laravel packages to compare alternatives.
Last updated
A Laravel package to easily use Feather Icons in your Blade views as inline SVG components.
For a full list of available icons, see the SVG directory or preview them at feathericons.com.
Install the package via Composer:
composer require brunocfalcao/blade-feather-icons
The package will automatically register itself via Laravel's package auto-discovery.
Icons can be used as self-closing Blade components:
<x-feathericon-heart />
<x-feathericon-alert-triangle />
<x-feathericon-activity />
Perfect for Tailwind CSS or any CSS framework:
<x-feathericon-heart class="w-6 h-6 text-red-500" />
<x-feathericon-mail class="h-4 w-4 text-gray-600" />
<x-feathericon-star style="color: #FFD700; width: 32px; height: 32px;" />
<x-feathericon-check-circle
class="w-5 h-5 text-green-500"
aria-hidden="true"
data-icon="success"
/>
<button @click="liked = !liked">
<x-feathericon-heart
class="w-5 h-5"
::class="liked ? 'text-red-500 fill-current' : 'text-gray-400'"
/>
</button>
{{-- Navigation --}}
<nav>
<a href="/dashboard">
<x-feathericon-home class="w-5 h-5" />
Dashboard
</a>
<a href="/settings">
<x-feathericon-settings class="w-5 h-5" />
Settings
</a>
</nav>
{{-- Buttons --}}
<button class="btn">
<x-feathericon-download class="w-4 h-4 mr-2" />
Download
</button>
{{-- Alerts --}}
<div class="alert alert-warning">
<x-feathericon-alert-triangle class="w-5 h-5" />
<span>Warning message here</span>
</div>
{{-- Loading States --}}
<x-feathericon-loader class="w-6 h-6 animate-spin text-blue-500" />
All 287 Feather icons are available. Common icons include:
Interface: home, menu, x, check, chevron-down, chevron-up, arrow-right, arrow-left, more-vertical, more-horizontal
Media: play, pause, volume, volume-x, music, video, image, camera, film
Communication: mail, message-circle, phone, at-sign, bell, send
Files: file, folder, download, upload, save, trash, edit, copy
Social: heart, star, thumbs-up, share, bookmark
E-commerce: shopping-cart, credit-card, dollar-sign, tag
Status: check-circle, x-circle, alert-circle, alert-triangle, info, help-circle
System: settings, user, lock, unlock, eye, eye-off, search, filter
If you need the raw SVG files as static assets:
php artisan vendor:publish --tag=blade-feather-icons --force
This will publish the icons to public/vendor/feather-icons/.
Then use them in your views:
<img src="{{ asset('vendor/feather-icons/heart.svg') }}" width="24" height="24" alt="Heart" />
Note: This is rarely needed. Using Blade components (default) is recommended for better performance and control.
Want to keep your icons up-to-date with the latest Feather Icons releases? You can sync SVG files directly from the npm package.
First, install the official Feather Icons npm package in your project:
npm install feather-icons --save-dev
Run the sync command to update your package's SVG files:
php artisan feathericons:sync
This will:
node_modules/feather-icons/dist/icons to the packagePreview changes without actually copying files:
php artisan feathericons:sync --dry-run
Example output:
Syncing Feather Icons...
โโโโโโโโโโโโโโโโโโโโโโโโโโโโ 100%
Total icons .......... 287
Would be added ....... 5
Would be updated ..... 12
Unchanged ............ 270
Run without --dry-run to apply these changes.
If your node_modules is in a non-standard location:
php artisan feathericons:sync --npm-path=/custom/path/to/project
feather-icons npm packageNote: This is a unique feature not available in other Blade icon packages! It gives you full control over your icon versions.
The package includes comprehensive Pest tests:
composer test
Run tests with coverage:
composer test-coverage
You can also use the svg() helper function:
{!! svg('feathericon-heart', 'w-6 h-6 text-red-500') !!}
With multiple attributes:
{!! svg('feathericon-star', ['class' => 'w-6 h-6', 'style' => 'color: gold']) !!}
If you want to change the default feathericon- prefix, you can extend the service provider in your own application.
This package is built on top of Blade Icons. You can use all Blade Icons features:
composer require brunocfalcao/blade-feather-iconsphp artisan view:clear && php artisan cache:clearresources/svg/Icon names use kebab-case. For example:
alert-triangle.svg โ <x-feathericon-alert-triangle />arrow-up-right.svg โ <x-feathericon-arrow-up-right />Blade Feather Icons works perfectly with Livewire. Just use the components as normal:
<div>
@if($isActive)
<x-feathericon-check-circle class="w-5 h-5 text-green-500" />
@else
<x-feathericon-x-circle class="w-5 h-5 text-red-500" />
@endif
</div>
Please see CHANGELOG for recent changes.
Contributions are welcome! Please feel free to submit a Pull Request.
Blade Feather Icons is developed and maintained by Bruno Falcao.
Blade Icons is developed and maintained by Dries Vints.
Feather Icons is created by Cole Bemis.
Blade Feather Icons is open-sourced software licensed under the MIT license.
Feather Icons is also licensed under the MIT license.
Love this package? Give it a โญ๏ธ on GitHub and follow @brunocfalcao on Twitter!