marcw/twig-heroicons
最新稳定版本:1.0.1
Composer 安装命令:
composer require marcw/twig-heroicons
包简介
Unofficial Twig integration for Heroicons
README 文档
README
This package provides an Heroicons integration for Twig.
Install
Use composer:
composer require marcw/twig-heroicons
Symfony
You do not need to do anything more to use the extension.
Twig
If you use Twig directly, register the extension before using it:
<?php use MarcW\Heroicons\Twig\HeroiconsExtension; use Twig\Environment; $twig = new Environment(/* ... */); $twig->addExtension(new HeroiconsExtension());
Usage
This extension provides a heroicon function that outputs the icon SVG.
{# function signature #} {{ heroicon(icon, class, style) }} {# the default style is 'solid' #} {{ heroicon('academic-cap') }} {# use the 'outline' style #} {{ heroicon('academic-cap', '', 'outline') }} {# Add a custom class to the SVG #} {{ heroicon('academic-cap', 'text-green-200', 'outline') }}
License
This library is MIT licensed.
统计信息
- 总下载量: 11.08k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 11
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2021-04-10