twithers/icons-plus
Composer 安装命令:
composer require twithers/icons-plus
包简介
README 文档
README
Icons Plus is a fieldtype that leverages https://iconify.design to provide a searchable list of open source icons for use in your Statamic site. Icons are stored both as a URL and SVG so they can be used as desired in templates.
Features
- Super easy to install and use
- Provides some configuration options for the fieldtype including icon library restrictions
How to Install
You can install this addon via Composer:
composer require twithers/icons-plus
How to Use
After adding the fieldtype to your blueprint, you can then store a selected icon.
The stored icon has the following keys:
iconPrefix
The prefix of the icon. This is used to identify the icon library.
iconName
The name of the icon. This is used to identify the specific icon within the library.
label
The prefix + name of the icon, separated by a :.
iconUrl
The URL of the icon. This is the URL to the SVG file. This allows for use in <img src="{{ iconUrl }}" />.
iconSvg
The SVG of the icon. This is the SVG markup for the icon. This allows for use in {!! iconSvg !!}.
Usage in Templates
The tag {{ icons_plus }} is available to use in your templates.
It can be used as context or as a tag pair.
The alias {{ ip }} is also available for the tag.
Context
{{ selected_icons_plus_icon }}
{{ icons_plus }}
{{ /selected_icons_plus_icon }}
The tag will resort to the stored SVG first, and fall back on fetching the icon svg via cached http request.
As a standalone tag
{{ icons_plus :icon="selected_icons_plus_icon" }}
Wildcard support
You can also use the icon's collection and name to render an icon via API:
{{ icons_plus:heroicons:chart-pie }}
Attibute support
All attributes are supported:
{{ icons_plus :icon="selected_icons_plus_icon" class="w-6 h-6 text-blue-500" x-data="" @click="console.log('clicked')" }}
twithers/icons-plus 适用场景与选型建议
twithers/icons-plus 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 6.5k 次下载、GitHub Stars 达 0, 最近一次更新时间为 2024 年 12 月 02 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 twithers/icons-plus 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 twithers/icons-plus 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 6.5k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Unknown
- 更新时间: 2024-12-02