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

Blade Icon Picker Laravel Package

nickperkins/blade-icon-picker

Standalone Blade icon picker component for Livewire forms. Works with any blade-icons pack (Heroicons, Font Awesome, custom). Includes search, lazy-loaded icon grid, keyboard navigation, responsive layout, and Tailwind-free CSS with customizable variables.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture Fit

  • Modular & Lightweight: The package is a standalone Blade component with minimal dependencies (Livewire 3, Alpine.js, blade-icons), making it easy to integrate into existing Laravel/Livewire applications without heavy coupling.
  • Server-Side Agnostic: Leverages blade-icons for SVG rendering, ensuring compatibility with any icon pack (Heroicons, Font Awesome, etc.) without requiring Filament or other admin frameworks.
  • Client-Side Efficiency: Uses Alpine.js for dynamic behavior (search, lazy rendering) without full-page reloads, reducing server load.

Integration Feasibility

  • Livewire 3 Compatibility: Designed specifically for Livewire 3’s wire:model binding, ensuring seamless integration with existing Livewire forms.
  • Blade Component: Works as a drop-in replacement for manual icon selection logic, reducing boilerplate.
  • Asset Publishing: Requires publishing CSS/JS via vendor:publish, a standard Laravel pattern.

Technical Risk

  • Dependency on blade-icons: If the project doesn’t use blade-icons, additional setup is required (e.g., installing blade-ui-kit/blade-heroicons).
  • Alpine.js Requirement: Must be loaded before the package’s JS (handled automatically in Livewire 3).
  • Dark Mode Handling: Requires manual CSS/JS integration for OS-level dark mode detection (not auto-detected by the package).
  • Icon Pack Size: Large icon sets (e.g., Font Awesome) may impact initial page load performance due to JSON payload size (~8KB gzipped for Heroicons).

Key Questions

  1. Icon Pack Strategy: Does the project already use blade-icons? If not, is there budget for adding blade-ui-kit/blade-heroicons or another pack?
  2. Livewire 3 Adoption: Is Livewire 3 already in use? If not, will this package force an upgrade?
  3. Dark Mode Support: Is dark mode a priority? If so, will the team implement OS-level detection or rely on manual theming?
  4. Performance Impact: For large icon sets (e.g., Font Awesome), will the initial JSON payload (~50KB uncompressed) be acceptable?
  5. Customization Needs: Are there requirements for custom icon packs, inline mode, or advanced theming beyond the provided CSS variables?

Integration Approach

Stack Fit

  • Laravel 10/11/12: Officially supported.
  • Livewire 3: Required for wire:model binding and Alpine.js integration.
  • PHP 8.2+: No breaking changes expected for newer PHP versions.
  • blade-icons 1.0+: Backend for SVG rendering; must be installed separately.

Migration Path

  1. Install Dependencies:
    composer require nickperkins/blade-icon-picker blade-ui-kit/blade-heroicons
    
  2. Publish Assets:
    php artisan vendor:publish --tag=icon-picker-assets
    
  3. Include Assets in Layout: Add CSS/JS to <head> and <body> (respecting Alpine.js load order).
  4. Update Livewire Components: Replace manual icon selection logic with <x-icon-picker::icon-picker wire:model="icon" :value="$icon" />.

Compatibility

  • Existing Livewire Forms: Drop-in replacement for text inputs or <select> elements.
  • Non-Livewire Projects: Not applicable; requires Livewire 3.
  • Tailwind Users: CSS is standalone (no Tailwind dependency), but theming may require customization.

Sequencing

  1. Dependency Installation: Install blade-icon-picker and an icon pack (e.g., blade-heroicons).
  2. Asset Publishing: Run vendor:publish to generate CSS/JS.
  3. Layout Updates: Add <link> and <script> tags to the main layout.
  4. Component Integration: Replace icon fields in Livewire forms with the picker.
  5. Testing: Validate search, lazy loading, and dark mode behavior.

Operational Impact

Maintenance

  • Low Overhead: Minimal PHP/JS/CSS to maintain; updates can be handled via Composer.
  • Dependency Updates: Requires monitoring blade-icons and Alpine.js compatibility.
  • Theming: CSS custom properties allow easy theming, but dark mode requires manual OS detection.

Support

  • Debugging: Errors (e.g., missing icon packs) are surfaced via Blade messages.
  • Livewire Integration: Standard wire:model binding reduces support complexity.
  • Alpine.js Dependencies: Issues may arise if Alpine.js is misconfigured (e.g., loaded after the package’s JS).

Scaling

  • Performance: Lazy rendering mitigates impact of large icon sets, but initial JSON payload grows with icon count.
  • Concurrency: No server-side bottlenecks; all logic is client-side except initial data hydration.
  • Caching: Icon list is static; no runtime caching needed.

Failure Modes

Scenario Impact Mitigation
Missing blade-icons pack Component shows error message Install blade-ui-kit/blade-heroicons
Alpine.js not loaded JS fails silently Ensure Alpine.js is loaded before the package’s JS
Large icon set (>2,000 icons) Slow initial load Consider chunking initial payload or using a lighter icon pack
Dark mode misconfiguration Incorrect theming Manually implement OS-level detection or use ip-dark class
Livewire 3 incompatibility Binding fails Verify Livewire version compatibility

Ramp-Up

  • Developer Onboarding: Requires familiarity with Livewire, Blade components, and Alpine.js.
  • Documentation: README and PRD are clear but assume basic Laravel/Livewire knowledge.
  • Example Integration: Provides a Livewire form example, reducing friction for adoption.
  • Testing: Includes Pest/Testbench tests; encourages unit testing for customizations.
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.
nasirkhan/laravel-sharekit
directorytree/privacy-filter-classifier
directorytree/privacy-filter
datacore/hub-sdk
develia/commons
cuci/prototurk-sdk
cuci/prototurk-sdk-symfony
develia/geo-bundle
dreamzy/livewire-charts
touchestate-sdk/php-sdk
22h/doctrine-garbage-collection-bundle
agtp/agtp-php
agtp/mod-php
splash/sonata-admin
splash/metadata
splash/openapi
splash/scopes
splash/toolkit
testo/output-teamcity
testo/bridge-symfony