andreiio/blade-iconoir

A package to easily make use of Iconoir in your Laravel Blade views.

Fund package maintenance!
code4romania

4.2.0 2024-04-06 12:57 UTC

README

68747470733a2f2f62616e6e6572732e6265796f6e64636f2e64652f426c61646525323049636f6e6f69722e706e673f7468656d653d6c69676874267061636b6167654d616e616765723d636f6d706f7365722b72657175697265267061636b6167654e616d653d616e64726569696f253246626c6164652d69636f6e6f6972267061747465726e3d617263686974656374267374796c653d7374796c655f31266465736372697074696f6e3d412b7061636b6167652b746f2b656173696c792b6d616b652b7573652b6f662b49636f6e6f69722b696e2b796f75722b4c61726176656c2b426c6164652b76696577732e266d643d312673686f7757617465726d61726b3d3126666f6e7453697a653d313030707826696d616765733d68747470732533412532462532466c61726176656c2e636f6d253246696d672532466c6f676f6d61726b2e6d696e2e737667

Blade Iconoir

A package to easily make use of Iconoir in your Laravel Blade views.

Latest Version on Packagist Software License Build Status Style CI Total Downloads

For a full list of available icons see the resources/svg directory or search

Requirements

  • PHP 7.4 or higher
  • Laravel 8.0 or higher

Install

composer require andreiio/blade-iconoir

Usage

Icons can be used a self-closing Blade components which will be compiled to SVG icons:

<x-iconoir-bookmark />

You can also pass classes to your icon components:

<x-iconoir-mail class="w-6 h-6 text-gray-500 fill-current" />

And even use inline styles:

<x-iconoir-warning-triangle-solid style="fill: #F00" />

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-iconoir --force

Then use them in your views like:

<img src="{{ asset('vendor/blade-iconoir/bicycle.svg') }}" width="10" height="10"/>

Blade Icons

Blade Iconoir uses Blade Icons under the hood. Please refer to the Blade Icons readme for additional functionality.

Testing

composer test

Credits

License

This project is licensed under the MIT License (MIT) – see the LICENSE file for details.