承接 wuhhh/craft-phosphor-icons 相关项目开发

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

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

wuhhh/craft-phosphor-icons

Composer 安装命令:

composer require wuhhh/craft-phosphor-icons

包简介

Craft CMS plugin exposing a Phosphor icons field - aims to replicate the first-party `icon` field as closely as possible

README 文档

README

This plugin aims to replicate most of the functionality of the native Craft icon field, but using the Phosphor Icons library instead of Font Awesome.

All styles are supported and can be configured per field. The plugin bundles the full icon library, so you do not need to do include any external style sheets or import extra dependencies at the front end.

Usage

Add a Phosphor Icon field to your entry type with your desired configuration - you can elect to allow choosing from the full set of styles (Duotone, Regular, etc), or narrow the list.

Development

A helper is exposed for rendering the icon, supposing your field is called phosphorIcon, you could do something like this:

<div class="w-16 h-16 text-indigo-600 [&>svg]:w-full [&>svg]:h-full">
  {{ craft.phosphorIcons.icon(entry.phosphorIcon.name, entry.phosphorIcon.weight)|raw }}
</div>

The example above uses Tailwind utility classes.

Credits

All credit due to the Phosphor Icons team for making such a great set of icons available under the MIT license, please consider donating to them if you find their icons useful.

Visit phosphoricons.com for more information.

GraphQL

At time of writing, the GraphQL endpoint is consistent with the behaviour of Craft's native icon field in Basic mode. That is, it returns only the icon name. This is a known gap in functionality, as the chosen style is currently missing.

统计信息

  • 总下载量: 0
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-07-03

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固