LaravelPackages.net
Acme Inc.
Toggle sidebar
codeiucom/laravel-blade-svg-icons

CodeIU Laravel Blade Svg Icons Directive

7
0
v1.0.0
About codeiucom/laravel-blade-svg-icons

codeiucom/laravel-blade-svg-icons is a Laravel package for codeiu laravel blade svg icons directive. It currently has 0 GitHub stars and 7 downloads on Packagist (latest version v1.0.0). Install it with composer require codeiucom/laravel-blade-svg-icons. Discover more Laravel packages by codeiucom or browse all Laravel packages to compare alternatives.

Last updated

Laravel Blade Svg Icons Directives

install

composer require codeiucom/laravel-blade-svg-icons

use directive

- Heroicons

  • ex) @heroicons-iconName-style("classes")
  1. default
    @heroicons-folder("w-6 h-6")
    <!-- or -->
    <heroicons-folder class="w-6 h-6"/>
    <!-- or -->
    <heroicons-folder class="w-6 h-6"></heroicons-folder>
    
  2. outline
    @heroicons-folder-o("w-6 h-6")
    <!-- or -->
    <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("w-6 h-6")
    <!-- or -->
    <heroicons-folder-s class="w-6 h-6"/>
    <!-- or -->
    <heroicons-folder-s class="w-6 h-6"></heroicons-folder-s>
    

- Bootstrap Icons

  • ex) @twbsicons-iconName("classes")
    @twbsicons-github("w-5 h-5")
    <!-- or -->
    <twbsicons-github class="w-5 h-5"/>
    

Heroicons options

  1. change directive ex)

    # default heroicons
    CODEIU_LARAVEL_BLADE_SVG_HEROICONS_PREFIX=hicon
    # default twbsicons
    CODEIU_LARAVEL_BLADE_SVG_TWBS_ICONS_PREFIX=bsicon
    
  2. set default class ex)

    # default empty
    CODEIU_LARAVEL_BLADE_SVG_HEROICONS_DEFAULT_CLASSES="w-6 h-6"
    # default empty
    CODEIU_LARAVEL_BLADE_SVG_TWBSICONS_DEFAULT_CLASSES="w-5 h-5"
    

    if you use default class with tailwindcss, add below in tailwind.config.js

    module.exports = {
       ...
       content: [
          './storage/framework/views/*.php',
       ],
       ...
    }
    
  3. change heroicons default style (default: solid)

    CODEIU_LARAVEL_SVG_BLADE_HEROICONS_DEFAULT_STYLE=outline
    

svg icons

heroicons - v1.0.5
https://github.com/tailwindlabs/heroicons
twbs icons - v1.8.1
https://github.com/twbs/icons

Star History Chart