Weave Code
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 Icon Picker Laravel Package

wallacemartinss/filament-icon-picker

Modern icon picker for Filament v5 using Blade Icons. Includes a modal grid UI with live search, icon set/provider filtering, infinite scroll, and previews. Works as a form field, table column, and infolist entry; configurable and supports popular icon packs.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture Fit

  • Filament v5 Integration: The package is purpose-built for Filament v5, leveraging its form, table, and infolist components. This ensures seamless integration with Filament’s existing architecture (e.g., Form, Table, Infolist).
  • Blade Icons Ecosystem: Built on top of blade-ui-kit/blade-icons, it inherits a robust, modular icon system with support for multiple icon sets (Heroicons, FontAwesome, Phosphor, etc.). This aligns well with Laravel/PHP projects requiring UI consistency.
  • Type Safety: Auto-generated PHP Enums (Heroicons, PhosphorIcons, etc.) provide compile-time safety for icon usage, reducing runtime errors. This is a strong fit for projects prioritizing developer experience and maintainability.
  • Component-Based: The package follows Filament’s component-driven design, making it easy to reuse across forms, tables, and infolists without reinventing UI logic.

Integration Feasibility

  • Low Friction: Installation is streamlined with an interactive CLI (filament-icon-picker:install-icons) and minimal manual steps (Tailwind config, asset build). This reduces onboarding complexity.
  • Dependency Alignment: Requires Laravel 12+, Filament 5.0+, and PHP 8.2+, which are modern stacks with broad adoption. No breaking changes expected for supported versions.
  • Extensibility: Supports customization via config files, published assets, and helper methods (e.g., Icon::helper()). This allows TPMs to adapt the package to project-specific needs (e.g., restricting icon sets, custom animations).
  • Performance Optimizations: Features like infinite scroll and icon caching (php artisan icons:cache) address scalability concerns for large icon libraries (e.g., Phosphor’s 9,000+ icons).

Technical Risk

  • Icon Set Bloat: Installing all icon packages (e.g., Material + Phosphor) can increase bundle size and build times. Mitigation: Use the --all flag judiciously or restrict sets via config.
  • Tailwind Dependency: Requires Tailwind CSS for styling. Projects not using Tailwind may need additional CSS overrides, adding minor risk.
  • Enum Generation: Auto-generated Enums are powerful but require regeneration if icon packages are updated manually. The CLI (filament-icon-picker:generate-enums) mitigates this.
  • Filament Version Lock: Tied to Filament 5.0+. Upgrades to Filament 6+ may require package updates, though the MIT license allows forks if needed.

Key Questions

  1. Icon Set Strategy:
    • Which icon sets are critical for the project? (e.g., Heroicons for consistency, Phosphor for custom designs).
    • Will the team restrict sets via config to reduce complexity?
  2. Performance Impact:
    • How many icons will be loaded in production? (e.g., Phosphor’s 9,000+ icons may need lazy-loading tuning).
    • Is the icons:cache command feasible for CI/CD pipelines?
  3. Type Safety Trade-offs:
    • Should the team use auto-generated Enums (strict) or the Icon::helper() (flexible) for dynamic icons?
  4. Customization Needs:
    • Are there UI requirements (e.g., custom animations, icon sizes) not covered by the package’s defaults?
  5. Long-Term Maintenance:
    • How will the team handle future Filament upgrades? (e.g., Filament 6.0 compatibility).
    • Is there a plan to monitor for breaking changes in blade-icons?

Integration Approach

Stack Fit

  • Laravel/PHP: Fully compatible with Laravel’s ecosystem, leveraging Composer, Artisan commands, and Blade templating.
  • Filament v5: Designed as a first-class citizen for Filament’s form, table, and infolist components. No workarounds needed for core Filament features.
  • Tailwind CSS: Optimized for Tailwind’s utility classes. Projects using Tailwind will have minimal integration effort; others may need to adapt.
  • Blade Icons: Extends the blade-ui-kit/blade-icons ecosystem, enabling reuse of existing icon packages (e.g., Heroicons, FontAwesome).

Migration Path

  1. Pre-Integration:
    • Audit existing icon usage (e.g., SVG files, FontAwesome CDN) to identify replacement candidates.
    • Decide on icon sets (e.g., Heroicons for consistency, Phosphor for custom icons).
  2. Installation:
    • Run composer require wallacemartinss/filament-icon-picker.
    • Use the interactive installer (php artisan filament-icon-picker:install-icons) to select sets.
    • Update Tailwind config to include package views.
  3. Asset Build:
    • Run npm run build to compile Tailwind/CSS changes.
  4. Testing:
    • Test the IconPickerField in forms, IconPickerColumn in tables, and IconPickerEntry in infolists.
    • Verify auto-generated Enums work in navigation icons and actions.
  5. Optimization:
    • Cache icons (php artisan icons:cache) for production.
    • Restrict icon sets via config if needed.

Compatibility

  • Backward Compatibility: The package adheres to Filament 5.0+ and Laravel 12+ standards. No known conflicts with popular Laravel packages (e.g., Spatie, Livewire).
  • Custom Icon Sets: Supports adding new blade-icons packages via Composer, though these must be manually added to the config.
  • Filament Plugins: Works alongside other Filament plugins (e.g., Filament Forms, Tables) without conflicts.
  • Non-Tailwind Projects: Possible but requires manual CSS overrides for modal/styling. Not recommended unless necessary.

Sequencing

  1. Phase 1: Core Integration (1–2 days):
    • Install package and icon sets.
    • Replace hardcoded icons (e.g., SVG paths) with IconPickerField in forms.
    • Test in a staging environment.
  2. Phase 2: UI Consistency (1 day):
    • Standardize icon usage across tables (e.g., IconPickerColumn) and infolists.
    • Configure global defaults (e.g., modal size, allowed sets) in config/filament-icon-picker.php.
  3. Phase 3: Optimization (0.5 day):
    • Cache icons for production.
    • Restrict icon sets if performance is a concern.
  4. Phase 4: Documentation (0.5 day):
    • Document icon usage guidelines (e.g., "Use Heroicons for primary actions").
    • Add examples for dynamic icons (e.g., status-based colors).

Operational Impact

Maintenance

  • Dependency Updates:
    • Monitor wallacemartinss/filament-icon-picker and blade-ui-kit/blade-icons for updates.
    • Regenerate Enums if icon packages are updated manually (php artisan filament-icon-picker:generate-enums --all).
  • Configuration Drift:
    • Centralize icon set restrictions and defaults in config/filament-icon-picker.php to avoid ad-hoc changes.
  • Icon Set Management:
    • Use the --list flag (php artisan filament-icon-picker:install-icons --list) to audit installed sets.
    • Remove unused icon packages via Composer to reduce bundle size.

Support

  • Troubleshooting:
    • Common issues: Missing icons (check blade-icons packages), Tailwind build errors (verify @source directive), or enum generation failures (clear caches with php artisan optimize:clear).
    • Debugging tip: Use php artisan filament-icon-picker:generate-enums --verbose for detailed output.
  • Community Resources:
    • GitHub issues and discussions are active (48 stars, MIT license).
    • Blade Icons documentation covers icon set specifics (e.g., Blade Icons).
  • Fallback Plan:
    • For critical issues, revert to manual icon usage (e.g., SVG files) or fork the package.

Scaling

  • Performance:
    • Icon Loading: Infinite scroll and lazy loading handle large sets (e.g., Phosphor’s 9,000+ icons). Test with php artisan icons:cache in production.
    • Bundle Size: Restrict icon sets to essential packages (e.g., Heroicons + FontAwesome) to minimize asset bloat.
    • Database: No additional database overhead; icons are stored as strings (e.g., heroicon-o-star).
  • Team Scaling:
    • Auto-generated Enums reduce onboarding time for new developers (e.g., IDE autocomplete for Heroicons::OutlinedStar).
    • Centralized config allows teams to enforce icon usage standards (e.g., "Only use Heroicons for primary actions").
  • Multi-Tenant/Environment:
    • Icon sets can be environment-specific (e.g., dev uses all sets; prod restricts to Heroicons).
    • Use Filament’s resource-level overrides to customize icons per tenant (e.g., dynamic getNavigationIcon()).

Failure Modes

Failure Scenario Impact Mitigation
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.
calmfox/watch-sylius
damienfern/grpc-symfony-bundle
atoolo/index-bundle
atoolo/genai-bundle
coprotoai/laravel-ticket
davidjln/llm-carbon-bundle
cryonighter/valid-request-bundle
coolms/taxonomy-bundle
coolms/field-bundle
articulate-orm/symfony
aaix/laravel-tall-architect
ephoto/akeneo-connector
emmanuelballery/eb-plantumlbundle
emielburgman/symfony-visitor-beacon
emielburgman/symfony-visit-storage
emielburgman/symfony-security-headers
emielburgman/symfony-log-viewer
emarref/xdebug-bundle
emarref/pubnub-bundle
elriseio/finance-money-bundle