codeiucom / laravel-blade-svg-icons
CodeIU Laravel Blade Svg Icons 指令
v1.0.0
2022-03-02 02:48 UTC
Requires
- php: ^8.0
This package is auto-updated.
Last update: 2024-09-29 05:49:13 UTC
README
安装
composer require codeiucom/laravel-blade-svg-icons
使用指令
- Heroicons
- 例) @heroicons-
iconName
-style
("classes
")
- 默认
@heroicons-folder("w-6 h-6") <!-- or --> <heroicons-folder class="w-6 h-6"/> <!-- or --> <heroicons-folder class="w-6 h-6"></heroicons-folder>
- 轮廓
@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>
- 实心
@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
- 例) @twbsicons-
iconName
("classes
")@twbsicons-github("w-5 h-5") <!-- or --> <twbsicons-github class="w-5 h-5"/>
Heroicons 选项
-
更改指令例)
# default heroicons CODEIU_LARAVEL_BLADE_SVG_HEROICONS_PREFIX=hicon # default twbsicons CODEIU_LARAVEL_BLADE_SVG_TWBS_ICONS_PREFIX=bsicon
-
设置默认类例)
# 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"
如果你在 TailwindCSS 中使用默认类,请将以下内容添加到 tailwind.config.js 中
module.exports = { ... content: [ './storage/framework/views/*.php', ], ... }
-
更改 Heroicons 默认样式(默认:实心)
CODEIU_LARAVEL_SVG_BLADE_HEROICONS_DEFAULT_STYLE=outline
svg 图标
heroicons - v1.0.5
https://github.com/tailwindlabs/heroicons
twbs icons - v1.8.1
https://github.com/twbs/icons