psyao/filament-icon-picker

A Filament form field that provides a searchable icon picker backed by Blade UI Icons manifests.

Fund package maintenance!
psyao

Installs: 5

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 0

Open Issues: 0

pkg:composer/psyao/filament-icon-picker

1.0.0 2025-12-02 19:40 UTC

This package is auto-updated.

Last update: 2025-12-02 19:54:21 UTC


README

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

A Filament form field that provides a searchable icon picker backed by Blade UI Icons.

By default, Filament includes Heroicons out of the box. This package makes it easy to surface additional icon sets (registered with Blade Icons) in a modal picker.

Notes

  • IconPicker extends Filament's ModalTableSelect and customizes selection and preview behavior.
  • Prefer the IconPicker API for configuration and usage — calling ModalTableSelect methods directly may break selection, styling, or the live preview.

Table of contents

Requirements

  • PHP ^8.2
  • Filament 4.x

Features

  • Modal picker with a searchable table of icons
  • Live preview of the selected icon
  • Filter available icon sets
  • Simple integration with Filament forms, tables and infolists

Installation

Install via Composer:

composer require psyao/filament-icon-picker

Usage

In forms

Use the IconPicker field inside your Filament form schema. The field opens a modal table that lets users pick an icon and renders a live preview automatically.

Basic example:

use Psyao\FilamentIconPicker\Forms\IconPicker;

IconPicker::make('icon')

Limit available sets:

IconPicker::make('icon')
    ->sets(['lucide', 'simple-icons'])

Show labels under icons in the picker:

IconPicker::make('icon')
    ->showIconLabels()

In tables

To display the selected icon in a Filament table, use IconColumn:

use Filament\Tables\Columns\IconColumn;

IconColumn::make('icon')
    ->icon(fn ($state) => $state))

In infolists

To display the selected icon in an infolist, use IconEntry:

use Filament\Infolists\Components\IconEntry;

IconEntry::make('status')
    ->icon(fn ($state) => $state))

In Blade views

Render the selected icon in Blade (depending on your Blade Icons helper):

@svg($icon, ['class' => 'h-5 w-5'])

{{ svg($icon, ['class' => 'h-5 w-5']) }}

Testing

Run the test suite with:

composer test

Changelog

See CHANGELOG for recent changes.

Contributing

See CONTRIBUTING for contribution guidelines.

Security Vulnerabilities

Please review our security policy for reporting vulnerabilities.

Credits

License

The MIT License (MIT). See LICENSE.md for details.