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 powered by blade-icons. Provides a sleek modal with search, provider filtering, infinite scroll, and live preview. Includes a form field, table column, and infolist entry, with configurable modal layout and icon sets.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture Fit

  • Filament v5 Native Integration: The package is purpose-built for Filament v5, leveraging its form, table, and infolist components seamlessly. This ensures low architectural friction and consistent UX with Filament’s design system.
  • Blade Icons Ecosystem: Built on top of blade-ui-kit/blade-icons, it inherits a mature, well-maintained icon library with broad compatibility (Heroicons, FontAwesome, Phosphor, etc.). This reduces dependency risk and future-proofs icon selection.
  • Type Safety: Auto-generated PHP enums (e.g., Heroicons, PhosphorIcons) provide compile-time safety for icon usage, reducing runtime errors in navigation, actions, or dynamic UI elements.
  • Modular Design: The package decouples icon selection (modal UI) from display (form fields, table columns, infolists), enabling reusable components across the admin panel.

Integration Feasibility

  • Laravel 12+ / Filament 5+: Requires modern Laravel stacks, but this aligns with current best practices for new projects. Legacy systems may face upgrade costs.
  • Blade Icons Dependency: Requires installing at least one icon package (e.g., blade-heroicons). This adds ~1–5MB to the asset bundle, depending on the set chosen.
  • Tailwind CSS: Requires adding vendor views to Tailwind’s scan path (@source directive). This is standard practice for Filament plugins but may need CI/CD adjustments if using custom build pipelines.
  • Artisan Commands: Heavy reliance on CLI commands (filament-icon-picker:install-icons, icons:cache) simplifies setup but may require custom scripting for automated deployments.

Technical Risk

  • Icon Set Bloat: Installing large icon sets (e.g., Material Design with 10K icons) could increase bundle size and slow initial load times. Mitigation: Use the --all flag judiciously or cache icons (php artisan icons:cache).
  • Dynamic Icon Resolution: The Icon helper and enums abstract icon naming conventions (e.g., heroicon-o-star vs. phosphor-whatsapp-logo-duotone), which could lead to confusion during debugging if not documented.
  • Filament Version Lock: Tied to Filament 5.x. Major Filament upgrades may require package updates or forks.
  • Customization Limits: While configurable (modal size, columns, allowed sets), deep UI customization (e.g., overriding Blade templates) may require manual overrides in child themes.

Key Questions

  1. Icon Set Strategy:
    • Which icon sets are critical for the product? (Prioritize smaller sets like Heroicons for core features.)
    • Will dynamic icon loading (e.g., lazy-loading sets) be needed for large-scale apps?
  2. Performance Impact:
    • How will the additional assets affect CI/CD build times and production bundle size?
    • Should icons:cache be run in CI or manually?
  3. Type Safety Trade-offs:
    • Is the enum generation overhead justified, or will the Icon helper suffice for most use cases?
  4. Long-Term Maintenance:
    • Who will handle updates if the package stagnates? (Forking risk.)
    • Are there plans to support Filament 6+ when released?
  5. Accessibility:
    • Are icon labels (e.g., showLabel()) sufficient for screen readers, or will ARIA attributes need manual addition?

Integration Approach

Stack Fit

  • Primary Use Case: Ideal for Filament v5 admin panels where icons are used in:
    • Navigation menus ($navigationIcon).
    • Form fields (e.g., selecting a "status icon" for records).
    • Table columns (e.g., visual indicators for is_active).
    • Infolists (e.g., displaying a user’s role icon).
  • Secondary Use Case: Can augment Laravel Blade templates outside Filament via the Icon helper, but this is not the primary design goal.
  • Anti-Patterns:
    • Avoid using for high-frequency dynamic icons (e.g., real-time dashboards) due to modal overhead.
    • Not suitable for frontend frameworks (React/Vue) unless integrated via Inertia.js.

Migration Path

  1. Assessment Phase:
    • Audit existing icon usage (e.g., hardcoded SVG paths, FontAwesome classes).
    • Identify icon sets needed (e.g., Heroicons for core, Phosphor for new features).
  2. Proof of Concept:
    • Install the package in a staging environment and test:
      • Icon picker modal performance with the chosen sets.
      • Enum generation and IDE autocomplete.
      • Form field/table column rendering.
  3. Phased Rollout:
    • Phase 1: Replace static icons (e.g., navigation, actions) with enums/helpers.
    • Phase 2: Migrate form fields to IconPickerField.
    • Phase 3: Update table columns/infolists to use IconPickerColumn/IconPickerEntry.
  4. Deprecation:
    • Phase out custom icon classes (e.g., fas fa-user) in favor of the package’s API.

Compatibility

Component Compatibility Notes
Filament 5.x Full support. Test against the latest patch version (e.g., 5.10.x).
Laravel 12+ Works with Laravel 12/13. Test with PHP 8.2+ (8.3 recommended).
Tailwind CSS Requires Tailwind v3+. Customize via theme.css @source directive.
Blade Icons Supports all Blade Icons packages.
Custom Themes May need to override Blade templates if deep UI changes are required.

Sequencing

  1. Prerequisites:
    • Upgrade to Laravel 12+ and Filament 5+ if not already.
    • Install Node.js (for Tailwind builds).
  2. Installation Order:
    composer require wallacemartinss/filament-icon-picker
    php artisan filament-icon-picker:install-icons  # Select sets interactively
    npm install && npm run build
    php artisan optimize:clear
    
  3. Post-Install:
    • Publish config if customizing defaults:
      php artisan vendor:publish --tag="filament-icon-picker-config"
      
    • Cache icons for production:
      php artisan icons:cache
      

Operational Impact

Maintenance

  • Dependency Updates:
    • Monitor wallacemartinss/filament-icon-picker and blade-ui-kit/blade-icons for breaking changes.
    • Icon set packages (e.g., blade-heroicons) may release updates independently.
  • Configuration Drift:
    • Centralize icon set configurations in config/filament-icon-picker.php to avoid hardcoded values.
    • Use feature flags for experimental icon sets (e.g., toggle Phosphor icons behind a flag).
  • Debugging:
    • Leverage enums for autocomplete and compile-time checks (e.g., Heroicons::OutlinedStar).
    • For dynamic icons, log the resolved icon string (e.g., Icon::phosphor('user', 'fill')) to catch typos.

Support

  • Common Issues:
    • Blank Modal: Check Tailwind @source directive and npm run build.
    • Missing Icons: Ensure icon sets are installed (composer show).
    • Performance: Profile modal load times with large sets; use icons:cache.
  • Support Channels:
    • GitHub Issues (46 stars, active maintenance).
    • Blade Icons community for icon-set-specific questions.
  • Documentation Gaps:
    • Limited examples for dynamic icon resolution (e.g., fn ($record) => ...).
    • No guidance on custom icon sets beyond Blade Icons.

Scaling

  • Performance:
    • Modal Load: Infinite scroll and lazy loading mitigate initial load times for large sets.
    • Bundle Size: Cache icons in production (php artisan icons:cache) to reduce runtime parsing.
    • Database: Icon values (e.g., heroicon-o-star) are stored as strings; no additional DB schema changes.
  • Concurrency:
    • Stateless design (icons are UI-only); no race conditions.
    • Heavy icon sets may increase asset compilation time during deployments.
  • Multi-Tenant:
    • Icon sets are global (not tenant-specific). Use feature flags to enable/disable sets per tenant.

Failure Modes

Scenario Impact Mitigation Strategy
Icon set package fails to install Broken modal UI Fallback to manual Composer installs.
Tailwind build fails
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.
jayeshmepani/jpl-moshier-ephemeris-php
elnasnato/laraliveui
labrodev/rest-sdk
sampaui/sampaui
babelqueue/php-sdk
facebook/capi-param-builder-php
babelqueue/symfony
hamzi/corewatch
minionfactory/raw-hydrator
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager
alimarchal/laravel-chart-of-accounts
babenkoivan/elastic-scout-driver
mkwebdesign/filament-watchdog-v5
renatomarinho/laravel-page-speed
zedmagdy/filament-business-hours
renatovdemoura/blade-elements-ui
devgeek/beacon-admin
benjamin-rqt/data-watcher-bundle