Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Filament Phosphor Icons

Filament Phosphor Icons Laravel Package

tonegabes/filament-phosphor-icons

A Phosphor icon set for Filament 4 and 5 applications, exposed as a convenient enum for actions, forms, toggles, and columns. Includes weight presets, forceWeight(), and helper methods for dynamic runtime styling. Install via Composer: tonegabes/filament-phosphor-icons.

View on GitHub
Deep Wiki
Context7

Phosphor Icons Pack ready for Filament 4

Frequently asked questions about Filament Phosphor Icons
How do I install tonegabes/filament-phosphor-icons in a Laravel app?
Run composer require tonegabes/filament-phosphor-icons in the root of your Laravel application. There is nothing else to do: the package ships no assets, no configuration file and no service provider you need to register, because every icon is exposed as a plain backed enum. Once Composer has autoloaded it, import ToneGabes\Filament\Icons\Enums\Phosphor and pass cases directly to any Filament method that accepts an icon.
Does this package support Filament 5 as well as Filament 4?
Yes. The package targets Filament 4 and Filament 5, with Filament 5 support added in the 1.3.0 release. Expect the version constraint to move in lockstep with Filament majors, so check the released tag against the Filament version in your composer.lock before upgrading. Because the enum only produces icon name strings, a version mismatch degrades to a missing glyph rather than a broken page.
How do I use a Phosphor icon on a Filament action, toggle or icon column?
Import the Phosphor enum and pass a case wherever Filament accepts an icon, for example Action::make('star')->icon(Phosphor::StarBold) or Toggle::make('is_starred')->onIcon(Phosphor::StarFill)->offIcon(Phosphor::Star). The same works for table row actions, IconColumn, badges, notifications, empty states and navigation groups, since all of them share Filament's icon contract. You can also return a case from a closure to pick the icon from record state inside a match expression.
How do I change the icon weight to thin, light, regular, bold, fill or duotone?
Phosphor ships icons in six weights and the package exposes them through the Weight enum and a forceWeight method. Call Phosphor::Star->forceWeight(Weight::Fill) to swap the style, or pass a plain string weight if the value is dynamic at runtime. forceWeight returns the resolved icon, so it can be chained inline on any Filament icon call.
What do the fluent helpers like ->bold() and ->fill() do?
Each weight has a shorthand method, so Phosphor::StarBold->thin(), ->light(), ->regular(), ->fill(), ->bold() and ->duotone() all override the case's default weight and return the same enum instance. That keeps call sites short when you only need to tweak one icon rather than construct a Weight enum. The package also provides matching predicates such as isBold() and isFill() for conditional logic.
Is there a way to filter the icon catalogue by weight in PHP?
Yes, the enum includes catalogue filters such as getBoldIcons() and getRegularIcons() that return only the cases matching that weight. They are useful when building an icon picker, a design-token list or a seeded demo page. Note the full Phosphor catalogue is exposed, so filter rather than iterating every case in a loop that renders previews.
Do I need to publish config, migrations or assets after installing?
No. The package is a data catalogue with a fluent API, not infrastructure: there is no published config, no JavaScript, no CSS, no migrations, no middleware and no meaningful service provider. Installation is a single Composer require and an import statement. That also means there is no new runtime layer or failure domain introduced into your Filament panel.
What does the php artisan phosphor:sync command do?
phosphor:sync regenerates the Phosphor enum from the upstream icon catalogue, so new icons can be pulled in without waiting for a package release. It supports a --dry-run flag to preview the diff and an --enum-path option to write the generated enum somewhere else, such as your own namespace. Because the enum is demonstrably generated rather than hand-maintained, forking or inlining a subset is a realistic fallback.
Can I use these icons in Blade templates without Filament?
Yes. Each enum case resolves through getLabel() to a phosphor-* icon name, so it renders through Blade's @svg directive, the svg() helper or the x-icon component just as it does through Filament's icon() method. That makes it practical to keep the same icon vocabulary in custom panel pages and emails. Just confirm the underlying icon set is registered in whatever rendering context you use outside Filament.
Is this package safe to use in production and what are the maintenance risks?
The code itself is low risk because it is generated data with few failure modes, but adoption is very small, the project has a single maintainer and there is little public evidence of production use. The practical mitigations are to pin an exact version in composer.json, add one smoke test that exercises your icon call sites and treat the package as vendored code you are willing to fork. If you decide against Phosphor entirely, Filament already ships Heroicons at no extra cost.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
coleus/frame
thtg88/journalism
filagora/filagora-ai-forums
rlacerda83/query-parser
socialdept/atp-orm
cboxdk/laravel-assistant-client
socialdept/atp-resolver
socialdept/tenant-domains
tautvydasr/blade-class-names
socialdept/color-scales
maherelgamil/controller
coleus/widgets
coleus/table
coleus/users
coleus/music
coleus/health
coleus/calendar
coleus/notes
coleus/support
coleus/settings