Search by

schmeits / filament-4-phosphor-icons

schmeits

Phosphor icons for Filament 4 and 5 as a backed enum that scales with Filament's icon sizes, in all six Phosphor weights.

Package info

github.com/schmeits/filament-4-phosphor-icons

pkg:composer/schmeits/filament-4-phosphor-icons

Fund package maintenance!

schmeits

Statistics

Installs: 3 661

Dependents: 0

Suggesters: 0

Stars: 17

Open Issues: 0

1.1.0 2026-10-13 12:50 UTC

This package is auto-updated.

Last update: 2026-10-26 01:25:36 UTC


README

Latest Version on Packagist Tests PHPStan Total Downloads

All Phosphor icons as a backed enum for Filament. The enum implements Filament's ScalableIcon contract, so every icon follows Filament's icon sizes, and you can pick any of the six Phosphor weights yourself.

The icons themselves come from codeat3/blade-phosphor-icons.

Compatibility

Package Filament Laravel PHP
1.1 4.13.2+ and 5.8.2+ 12, 13 8.2+ (Laravel 13: 8.3+)
1.0 4.x 11, 12 8.2+

The minimum Filament versions are the first ones without known security advisories.

Installation

composer require schmeits/filament-4-phosphor-icons

Usage

use Filament\Forms\Components\TextInput;
use Schmeits\FilamentPhosphorIcons\Support\Icons\Phosphor;

TextInput::make('name')
    ->required()
    ->prefixIcon(Phosphor::Smiley);

Find the icon you need on phosphoricons.com. The enum case is the icon name in PascalCase: smiley-sticker becomes Phosphor::SmileySticker.

Sizes

When you pass the enum itself, Filament asks it for an icon per size. This package maps the sizes to a weight:

Filament size Weight
ExtraSmall, Small thin
Medium regular
Large, ExtraLarge, TwoExtraLarge bold

Weights

To use one weight everywhere, pick it explicitly:

use Schmeits\FilamentPhosphorIcons\Support\Icons\Phosphor;
use Schmeits\FilamentPhosphorIcons\Support\Icons\PhosphorWeight;

->prefixIcon(Phosphor::Smiley->getIconForWeight(PhosphorWeight::Duotone))

The available weights are Thin, Light, Regular, Bold, Fill and Duotone.

Updating the icons

The enum is generated from the installed version of codeat3/blade-phosphor-icons. After upgrading that package:

composer generate-enum

The test suite fails when the enum and the icon source no longer match, in either direction.

Testing

composer test
composer analyse

Changelog

Please see CHANGELOG for more information on what has changed recently.

Security

Please see our security policy on how to report security vulnerabilities.

Credits

License

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