zephyrphp/blade-heroicons

Heroicons in your Laravel Blade views.

Fund package maintenance!
Buy Me A Coffee

Installs: 6

Dependents: 1

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 0

Open Issues: 0

Language:Blade

1.0.0 2024-10-16 07:37 UTC

This package is auto-updated.

Last update: 2024-11-16 08:42:21 UTC


README

Latest Version on Packagist Total Downloads

For a full list of available icons see heroicons.com. Heroicons are originally developed by Steve Schoger and Adam Wathan.

Installation

Install the package via composer:

composer require zephyrphp/blade-heroicons

You must modify your tailwind.config.js file to include blade-heroicons views:

content: [
    // ...
    './vendor/zephyrphp/blade-heroicons/**/*.blade.php'
]

You can publish the config file with:

php artisan vendor:publish --tag="blade-heroicons-config"

This is the contents of the published config file:

return [

    /*
    |-----------------------------------------------------------------
    | Default Namespace
    |-----------------------------------------------------------------
    |
    | This config option allows you to define a default namespace for
    | your icons. By default, Blade Heroicons will look for icons in
    | the "ui" namespace. You can change this value to any string.
    | usage: <x-icon::academic-cap />
    */

    'namespace' => 'icon',

];

You can publish the views using

php artisan vendor:publish --tag="blade-heroicons-views"

Usage

// By default, use solid variant
<x-icon::academic-cap />

// You can also use others variants
<x-icon::academic-cap variant="micro" />
<x-icon::academic-cap variant="mini" />
<x-icon::academic-cap variant="solid" />

Changelog

Please see CHANGELOG for more information on what has changed recently.

Credits

License

The MIT License (MIT). Please see License File for more information.