Blade Heroicons
Blade Heroicons stats
- Downloads
- 3.4M
- Stars
- 464
- Open Issues
- 0
- Forks
- 47
A package to easily make use of Heroicons in your Laravel Blade views.
Blade Heroicons
Blade Heroicons is a Laravel package that simplifies the integration of Heroicons into Laravel Blade views. Developed by Steve Schoger and Adam Wathan, Heroicons offer a refined set of SVG icons which this package makes effortlessly available within Blade templating.
Key Features:
- Ease of Use: Integrate Heroicons directly in Blade files as self-closing Blade components.
- Flexible Customization: Easily style icons using classes or inline styles.
- Blade Icons Integration: Leverage additional features from the Blade Icons library, such as default classes and attributes.
- Icon Caching: Enhance performance by enabling icon caching.
Requirements:
- PHP 8.0 or higher
- Laravel 9.0 or higher
Installation:
Install the package via Composer:
composer require blade-ui-kit/blade-heroicons
Configuration:
To customize default settings, publish the configuration file:
php artisan vendor:publish --tag=blade-heroicons-config
Usage:
Embed icons directly in your Blade templates as components:
<x-heroicon-o-arrow-left class="w-6 h-6 text-gray-500"/>
Or use the @svg directive for more control:
@svg('heroicon-o-arrow-left', 'w-6 h-6', ['style' => 'color: #555'])
Accessing Raw SVG Icons:
Publish and use the raw SVG files in your application:
php artisan vendor:publish --tag=blade-heroicons --force
<img src="{{ asset('vendor/blade-heroicons/o-arrow-left.svg') }}" width="10" height="10"/>
Updating:
Consult the upgrade guide for safe library updates.
More Information:
- Changelog: The CHANGELOG documents all updates.
- License: Open-sourced under the MIT license.
- Maintainer: Developed and maintained by Dries Vints.
Blade Heroicons is an essential tool for developers looking to spice up their Laravel applications with high-quality, customizable icons directly within their Blade views.