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

This package is auto-updated.

Last update: 2024-04-20 14:33:05 UTC


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/>