forrodominik / blade-sf-icons
A package to easily make use of StoreFront Icons in your Laravel Blade views.
v1.9
2022-06-20 10:24 UTC
Requires
- php: ^7.4|^8.0
- blade-ui-kit/blade-icons: ^1.1
- illuminate/support: ^8.0|^9.0
Requires (Dev)
- orchestra/testbench: ^6.0|^7.0
- phpunit/phpunit: ^9.0
README
A package to easily make use of StoreFront Icons in your Laravel Blade views.
Available icons
Requirements
- PHP 7.4 or higher
- Laravel 8.0 or higher
Installation
composer require forrodominik/blade-sf-icons
Configuration
Blade StoreFront Icons also offers the ability to use features from Blade Icons like default classes, default attributes, etc. If you'd like to configure these, publish the blade-sf-icons.php
config file:
php artisan vendor:publish --tag=blade-sf-icons-config
Usage
Icons can be used as self-closing Blade components which will be compiled to SVG icons:
<x-sficon-adjustments/>
You can also pass classes to your icon components:
<x-sficon-adjustments class="w-6 h-6 text-gray-500"/>
And even use inline styles:
<x-sficon-adjustments style="color: #555"/>
The solid icons can be referenced like this:
<x-sficon-s-adjustments/>