adamkiss/kirby-icons-heroicons
Composer 安装命令:
composer require adamkiss/kirby-icons-heroicons
包简介
Heroicons as snippets for Kirby CMS
README 文档
README
A set of 450+ free MIT-licensed high-quality SVG icons for you to use in your Kirby CMS Projects.
Packaged as a set of Kirby snippets, allowing you to embed them easily. Check out the original project for more information.
Installation
Either download the folder and copy it to your site/plugins/ folder, or with composer:
composer require adamkiss/kirby-icons-heroicons
Usage
// use an icon as is snippet('heroicons/solid/check'); // or snippet('heroicons/mini/check'); // or add additional classes snippet('heroicons/outline/check', [ 'class' => 'red-color', 'attributes' => 'aria-hidden="true" data-hook="something"' // You can also add custom attributes 'strokeWidth' => 3 // Outline icons have a modifiable stroke width as well ]);
Available variants/sizes:
- outline (24px)
- solid (24px)
- mini (20px)
- micro (16px)
By default, no class is used, and the default attribute is aria-hidden="true". If you add an attribute and want to keep the aria-hidden attribute, you have to add it as well.
Icon Field support (WIP)
When you install Heroicons and Icon Field at the same time, you can use all Heroicons as the options in the Icon Field:
// in your config.php, configure icon-field to use Heroicons by default 'tobimori.icon-field' => [ 'folder' => fn() => \Heroicons::folder(), 'sprite' => fn() => \Heroicons::sprite(), ],
# In your bluprints, keep the icon field folder/sprite blank for the # default to to be picked upw fields: icon: label: Icon type: icon max: 1
And then, once the you've set up the icon in the panel, you can use it in your templates/snippets like so:
<?= snippet("heroicons/mini/{$page->icon()}") ?>
For more information, you can check out the Kirby Icon Field documentation.
License
MIT (c) 2024 Adam Kiss for the plugin, Tailwind Labs for the Heroicons
adamkiss/kirby-icons-heroicons 适用场景与选型建议
adamkiss/kirby-icons-heroicons 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 811 次下载、GitHub Stars 达 11, 最近一次更新时间为 2022 年 05 月 25 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「icons」 「snippets」 「kirby」 「kirby-plugin」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 adamkiss/kirby-icons-heroicons 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 adamkiss/kirby-icons-heroicons 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 adamkiss/kirby-icons-heroicons 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
A simple library of SVG page type icons for enhancing your SilverStripe CMS interface.
Zero-dependency global `kirbylog()` helper for any content
A Filament plugin that integrates tabler icons, allowing you to use them seamlessly across Filament forms, tables, actions, and more.
Courier offers a convenient and painless solution for creating emails tailored for your Kirby website.
Craft CMS Twig extension to include SVGs from the Feather and Zondicons SVG icon libraries directly in your templates.
Blade template for Kirby
统计信息
- 总下载量: 811
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 11
- 点击次数: 6
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-05-25