guava/filament-icons
A Filament plugin for browsing, searching, and selecting icons directly inside your admin panel forms. Preview icon sets, pick the right glyph, and store icon names on your models for easy rendering throughout Filament resources and views.
Architecture fit. This is a development-time code generator, not a runtime library. It reads the Blade icon sets already installed in the app (blade-ui-kit/blade-icons plus at least one concrete set such as Heroicons or Phosphor) and emits plain PHP enum classes into the application namespace. The generated enums do not call back into the package, which means the architectural coupling is limited to the build step. That is an unusually clean fit for a Laravel/Filament estate: the artifact is portable PHP, and the dependency can be dropped without touching call sites. Fit is conditional on PHP 8.1+ (enums) and on the app actually being a Filament panel — outside Filament the value proposition narrows to generic Blade Icons typing.
Integration feasibility. Low effort. composer require, publish config to scope which icon sets are enumerated, run the generator, run php artisan icons:cache, then swap a single navigation icon as a smoke test. Realistically a day to prove end to end, a sprint to roll out with discipline. The one thing that must be resolved before any UI is planned around it: the package description pitches a searchable icon picker form component and matching table column, while the README and the 1.1.0 release notes describe enum generation. Both may exist; the documentation set does not establish it. Treat the picker as unverified until it is seen in php artisan list and in a rendered form.
Technical risk. The dominant risk is maturity, not quality: zero stars, zero dependents, single maintainer, no independent production validation. The 1.1.0 release adding Filament v5 support and publishing a compatibility matrix is a genuine positive signal about maintenance intent, but it does not substitute for adoption evidence. Secondary risks are operational rather than architectural: no documented dry-run or --check mode means drift detection is ours to build; the icon cache produces blank glyphs when stale even though the enum is correct; icon renames fail silently where deletions fail loudly. All of these have cheap, known mitigations, which is why a time-boxed pilot is defensible and estate-wide standardization is premature.
Key questions to close before committing:
HasIcon/HasLabel (so ->icon(Heroicon::Cog) works), or must call sites use ->value? One answer determines every usage site; it must be known before rollout, not discovered during it.Stack fit. Filament panel on Laravel with PHP 8.1+, blade-ui-kit/blade-icons and at least one concrete icon set already present. If the team is not on Filament, the enum-generation value still holds for Blade views but the picker/column value does not — reassess scope accordingly.
Migration path. There is no migration in the data sense; nothing is persisted and no schema changes. The path is adoption, not transition:
ApprovedIcon with the dozen or so icons the design system sanctions) before expanding call sites. This is the seam that bounds blast radius on icon-set churn, keeps autocomplete usable when someone installs Font Awesome, and makes multi-brand theming a config change rather than a refactor.options() helper rather than inline mapping in every form class.Compatibility. Pin the package version explicitly. Reconcile the Filament version against the documented matrix as a pre-condition, not an assumption — the 1.0.1 → 1.1.0 jump appears to skip a major. Establish the rule that a Filament major bump and a package bump and a regeneration land in the same commit; splitting them creates a two-variable debugging problem. Keep runtime-dynamic icon choices (admin-picked, stored as strings in the database) separate from compile-time developer-authored icons; unifying them produces from($string) lookups that defeat the type safety this package exists to provide.
Sequencing. Prerequisite verification (PHP, Filament matrix, icon sets) → single-panel pilot with one icon swap → regeneration policy and CI drift gate → curated wrapper → broad call-site adoption → documented deploy runbook ordering generate → icons:cache → serve. Deploy-pipeline work should precede broad adoption, not follow it: stale enums are worse than raw strings because they type-check while pointing at icons that no longer exist.
Maintenance. The ongoing burden is discipline, not code. Regeneration must happen deliberately after any icon-set composer update, the diff reviewed like code, and the result committed. Because there is no dry-run mode, we own drift detection: run the generator in CI and git diff --exit-code on the enum directory, failing on any change. That is a five-line gate and should be treated as part of the integration cost, not as a gap to wait on. Editor performance is a secondary maintenance concern — a Font Awesome-scale catalog floods autocomplete and slows IDE indexing, so scope config to the sets actually used and expose the curated wrapper rather than the full catalog to call sites.
Support. Single maintainer, no community, no dependents. There is no vendor to escalate to and no reference implementation to consult. The mitigation is exit-cost, which here is genuinely low: removing one composer require line and replacing one Artisan command with an in-house generator of roughly a hundred lines. That asymmetry — high support risk, low exit cost — is precisely why a bounded pilot is the right posture. Standardizing across the estate would convert a tolerable single-team risk into a portfolio-level one.
Scaling. Scales acceptably along the code axis and poorly along the catalog axis. Adding icon sets is cheap and explicit (install the set, regenerate), which usefully creates a decision checkpoint when a stakeholder requests a new library. Adding tenants or brands is the scaling dimension that matters: because the enum case is a stable symbolic name and the concrete set is configuration, per-tenant icon sets become config rather than code — but only if the curated wrapper exists as the seam and the case names we depend on survive across sets. Designing that seam late is painful; designing it during the pilot is nearly free. Large catalogs, many panels, and many icon sets each degrade the developer experience before they degrade the application.
Failure modes. Ranked by likelihood and detection difficulty:
php artisan list and the generated files, not against marketing copy.home, user, and settings exist everywhere; confirm per-set namespacing before a second set is installed.Ramp-up. Low for engineers and low for the team's process surface. New hires discover the icon catalog through IDE autocomplete rather than a docs site or a design lookup, which improves velocity slightly on nearly every UI ticket — exactly the profile of a one-sprint DX investment worth funding. The ramp-up cost that must be resourced explicitly is the runbook: the ordering of generation, caching, and serving needs to be written down and owned by whoever controls the deploy pipeline, or the first post-install production deploy will present as an icon outage.
How can I help you explore Laravel packages today?