filafly/filament-carbon-icons
最新稳定版本:v1.0.0
Composer 安装命令:
composer require filafly/filament-carbon-icons
包简介
Carbon icon pack for Filament Icons
README 文档
README
Filament Carbon Icons
A Carbon icon set implementation for Filament 4.x, providing the full set of Carbon icons integrated with Filament's interface.
Installation
You can install the package via composer:
composer require filafly/filament-carbon-icons
After the package is installed, you must register the plugin in your Filament Panel provider:
use Filafly\Icons\Carbon\CarbonIcons; public function panel(Panel $panel): Panel { return $panel ->plugin(CarbonIcons::make()); }
Icon Styles
Carbon icons comes in a single style although there are some instances of an icon having filled or outline variants. There are no explicit style sets so this package doesn't support any global style selection.
Override Specific Icons
You can override specific icons or aliases using the following methods:
Override Icon Aliases
Use overrideAlias() to change which icon is used for specific Filament component aliases:
CarbonIcons::make() ->overrideAlias(PanelsIconAlias::SIDEBAR_EXPAND_BUTTON, Carbon::ChevronRight) ->overrideAlias(TablesIconAlias::FILTER_INDICATOR, Carbon::Filter);
Or use overrideAliases() to override multiple aliases at once by passing an array:
CarbonIcons::make() ->overrideAliases([ PanelsIconAlias::SIDEBAR_EXPAND_BUTTON => Carbon::ChevronRight, TablesIconAlias::FILTER_INDICATOR => Carbon::Filter, ActionsIconAlias::CREATE_ACTION_BUTTON => Carbon::AddAlt, ]);
Override Individual Icons
Use overrideIcon() to replace specific Carbon icons with different ones:
CarbonIcons::make() ->overrideIcon(Carbon::Search, Carbon::SearchAdvanced) ->overrideIcon(Carbon::Add, Carbon::AddAlt);
Or use overrideIcons() to override multiple icons at once by passing an array:
CarbonIcons::make() ->overrideIcons([ Carbon::Search->value => Carbon::SearchAdvanced, Carbon::Add->value => Carbon::AddAlt, Carbon::Edit->value => Carbon::EditOff, ]);
PHP arrays do not support enums as keys so
->valueis necessary if you want to reference the enum
These methods are particularly useful since Carbon icons come in a single style, allowing you to customize the icon set to better fit your application's needs.
License
The MIT License (MIT). Please see License for more information.
统计信息
- 总下载量: 147
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-07-25