承接 filafly/phosphor-icon-replacement 相关项目开发

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

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

filafly/phosphor-icon-replacement

最新稳定版本:v1.0.2

Composer 安装命令:

composer require filafly/phosphor-icon-replacement

包简介

Replace the default Filament icons with Phosphor icons.

README 文档

README

Banner

⚠️ DEPRECATED: This package has been deprecated and is no longer maintained.

Migration Required: Please migrate to filafly/filament-phosphor-icons which features:

  • Improved core architecture
  • Easier extensibility for community implementations
  • Active maintenance and support

Tired of Heroicons? Quickly swap out all icons used by the Filament framework with Phosphor icons. Include support for 6 different icon styles.

Requirements

  • PHP 8.1+
  • Filament v3.2+

Installation

There are only two steps to install Phosphor Icon Replacement. First, you need to install the package via composer:

composer require filafly/phosphor-icon-replacement

Secondly, add the plugin to any panels you wish:

->plugin(\Filafly\PhosphorIconReplacement::make())

Screenshots

Compare icon sets

Usage

Setting a default style

All 6 Phosphor icon styles are available and can be used by simply calling the style name as a method on the plugin:

PhosphorIconReplacement::make()->thin()
PhosphorIconReplacement::make()->light()
PhosphorIconReplacement::make()->regular()
PhosphorIconReplacement::make()->bold()
PhosphorIconReplacement::make()->fill()
PhosphorIconReplacement::make()->duotone()

If no style is explicitly chosen, regular will be used.

Override Specific Icons

If you need to override certain icons to use a different style, you can use either icon aliases or direct icon names.

Using Icon Aliases

Use the overrideStyleForAlias method with a Filament Icon Alias. This method works with either a single icon key (string) or multiple icon keys (array).

// Override a single icon key
PhosphorIconReplacement::overrideStyleForAlias('tables::actions.filter', 'thin');

// Override multiple icon keys at once
PhosphorIconReplacement::overrideStyleForAlias([
    'tables::actions.filter',
    'actions::delete-action',
], 'thin');

Using Icon Names

Use the overrideStyleForIcon method with the actual Phosphor icon name. Like the alias method, this works with either a single icon name or multiple names.

// Override a single icon
PhosphorIconReplacement::overrideStyleForIcon('phosphor-user', 'thin');

// Override multiple icons at once
PhosphorIconReplacement::overrideStyleForIcon([
    'phosphor-user',
    'phosphor-caret-up',
    'phosphor-bell',
], 'thin');

License

The MIT License (MIT). Please see License for more information.

统计信息

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

GitHub 信息

  • Stars: 14
  • Watchers: 1
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-01-17