caneco / blicons
A package to use your SVG icon sprite in your Laravel Blade views.
0.1.0
2020-08-24 12:17 UTC
Requires
- php: ^7.4
Requires (Dev)
- friendsofphp/php-cs-fixer: ^2.16
- orchestra/testbench: ^5.0
- phpunit/phpunit: ^9.3
- psalm/plugin-laravel: ^1.2
- vimeo/psalm: ^3.11
This package is auto-updated.
Last update: 2024-10-25 16:23:36 UTC
README
A package to use your SVG icon sprite for your Laravel Blade views.
Installation
You can install the package via composer:
composer require caneco/blicons
You can publish the expected icons resource folder and default icon
php artisan vendor:publish --provider="Caneco\Blicons\BliconsServiceProvider"
Usage
Add your icon set in the resources folder
Example:
resources/icons/user.svg
resources/icons/file.svg
resources/icons/mail.svg
Run the artisan command to create a cache file of you icon set
php artisan cache:icons
Add the icon sprite list in your Blade layout (generally at the bottom)
<x-icon-list/>
And use the icons at will in your Blade views
<x-icon type="user" class="text-red-500 w-8 h-8"/>
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Credits
License
The MIT License (MIT). Please see License File for more information.