codeiucom/laravel-blade-heroicons

CodeIU Laravel Blade HeroIcons Directive

v1.0.1 2022-03-02 02:58 UTC

This package is auto-updated.

Last update: 2024-04-29 04:41:15 UTC


README

more svg icons:
https://github.com/codeiucom/laravel-blade-svg-icons

install

composer require codeiucom/laravel-blade-heroicons

use directive

ex) @heroicons-iconName-style("classes")

  1. default
    @heroicons-folder("w-6 h-6")
    
  2. outline
    @heroicons-folder-o("w-6 h-6")
    
  3. solid
    @heroicons-folder-s("w-6 h-6")
    

use component

  1. default
    <heroicons-folder class="w-6 h-6"/>
    <!-- or -->
    <heroicons-folder class="w-6 h-6"></heroicons-folder>
  2. outline
    <heroicons-folder-o class="w-6 h-6"/>
    <!-- or -->
    <heroicons-folder-o class="w-6 h-6"></heroicons-folder-o>
  3. solid
    <heroicons-folder-s class="w-6 h-6"/>
    <!-- or -->
    <heroicons-folder-s class="w-6 h-6"></heroicons-folder-s>

options

  1. change directive (default: heroicons)
    ex)
       CODEIU_LARAVEL_BLADE_HEROICONS_PREFIX=icons
  2. change default style (default: solid)
    ex)
       CODEIU_LARAVEL_BLADE_HEROICONS_DEFAULT_STYLE=outline
  3. set default class (default: empty)
    ex)
       CODEIU_LARAVEL_BLADE_HEROICONS_DEFAULT_CLASSES="w-6 h-6"
    if you use default class with tailwindcss, add below in tailwind.config.js
    module.exports = {
       ...
       content: [
          './storage/framework/views/*.php',
       ],
       ...
    }