A Phosphor icon set implementation for Filament 3.x, providing a comprehensive set of Phosphor icons that seamlessly integrate with Filament's interface.
You can install the package via composer:
composer require filafly/filament-phosphor-icons
After the package is installed, you must register the plugin in your Filament Panel provider:
use Filafly\Icons\Phosphor\PhosphorIcons; public function panel(Panel $panel): Panel{ return $panel ->plugins([ PhosphorIcons::make(), ]);}
Phosphor icons come in multiple styles that you can switch between. Available styles include:
You can change the style using the following methods:
// Set to thin stylePhosphorIcons::make()->thin(); // Set to light stylePhosphorIcons::make()->light(); // Set to regular style (default)PhosphorIcons::make()->regular(); // Set to bold stylePhosphorIcons::make()->bold(); // Set to fill stylePhosphorIcons::make()->fill(); // Set to duotone stylePhosphorIcons::make()->duotone();
If you need to override certain icons to use a different style, you can use either icon aliases or direct icon names.
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 keyPhosphorIcons::make()->overrideStyleForAlias('tables::actions.filter', 'thin'); // Override multiple icon keys at oncePhosphorIcons::make()->overrideStyleForAlias([ 'tables::actions.filter', 'actions::delete-action',], 'thin');
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 iconPhosphorIcons::make()->overrideStyleForIcon('phosphor-user', 'thin'); // Override multiple icons at oncePhosphorIcons::make()->overrideStyleForIcon([ 'phosphor-user', 'phosphor-caret-up',], 'thin');
The MIT License (MIT). Please see License for more information.