codeat3/blade-teeny-icons

A package to easily make use of "Teeny Icons" in your Laravel Blade views.

1.10.0 2024-02-28 15:27 UTC

This package is auto-updated.

Last update: 2024-03-28 15:39:44 UTC


README

68747470733a2f2f62616e6e6572732e6265796f6e64636f2e64652f426c6164652532305465656e7925323049636f6e732e706e673f7468656d653d6c69676874267061636b6167654d616e616765723d636f6d706f7365722b72657175697265267061636b6167654e616d653d636f6465617433253246626c6164652d7465656e792d69636f6e73267061747465726e3d617263686974656374267374796c653d7374796c655f31266465736372697074696f6e3d412b7061636b6167652b746f2b7573652b5465656e792b49636f6e732b696e2b796f75722b4c61726176656c2b426c6164652b7669657773266d643d312673686f7757617465726d61726b3d3126666f6e7453697a653d313030707826696d616765733d68747470732533412532462532466c61726176656c2e636f6d253246696d672532466c6f676f6d61726b2e6d696e2e737667

Blade Teeny Icons

Tests Latest Stable Version Total Downloads

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

For a full list of available icons see the SVG directory or preview them at teenyicons.com.

Requirements

  • PHP 7.4 or higher
  • Laravel 8.0 or higher

Installation

composer require codeat3/blade-teeny-icons

Updating

Please refer to the upgrade guide when updating the library.

Blade Icons

Blade Teeny Icons uses Blade Icons under the hood. Please refer to the Blade Icons readme for additional functionality. We also recommend to enable icon caching with this library.

Configuration

Blade Teeny 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-teeny-icons.php config file:

php artisan vendor:publish --tag=blade-teeny-icons-config

Usage

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

<x-tni-360/>

You can also pass classes to your icon components:

<x-tni-360 class="w-6 h-6 text-gray-500"/>

And even use inline styles:

<x-tni-360 style="color: #555"/>

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

Then use them in your views like:

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

Changelog

Check out the CHANGELOG in this repository for all the recent changes.

Maintainers

Blade Teeny Icons is developed and maintained by Swapnil Sarwe.

License

Blade Teeny Icons is open-sourced software licensed under the MIT license.