承接 marcw/twig-heroicons 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

marcw/twig-heroicons

最新稳定版本:1.0.1

Composer 安装命令:

composer require marcw/twig-heroicons

包简介

Unofficial Twig integration for Heroicons

README 文档

README

tests

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

GitHub 信息

  • Stars: 11
  • Watchers: 2
  • Forks: 4
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-04-10