tomatophp/filament-icons

Heroicons Picker and Column for FilamentPHP

Fund package maintenance!
3x1io

v1.0.2 2024-05-17 16:48 UTC

This package is auto-updated.

Last update: 2024-05-17 16:49:29 UTC


README

Screenshot

Filament Heroicon Picker

Latest Stable Version PHP Version Require License Downloads

Heroicons Picker and Column for FilamentPHP

Screenshots

Dark Input

Dark Input Select

Light Input

Light Input Select

Table Column

Installation

composer require tomatophp/filament-icons

Usage

use TomatoPHP\FilamentIcons\Components\IconPicker;

public static function form(Form $form): Form
{
    return $form
        ->schema([
            IconPicker::make('icon')
                ->default('heroicon-o-academic-cap')
                ->label('Icon'),
        ]);
}
use TomatoPHP\FilamentIcons\Components\IconColumn;

public static function table(Table $table): Table
{
    return $table
        ->columns([
            IconColumn::make('icon')
                ->label('Icon'),
        ]);
}

Add Custom Icons

you can add a custom icon lib by use this Facade class inside your provider like this

use TomatoPHP\FilamentIcons\Facades\FilamentIcons;

public function boot(): void
{
    FilamentIcons::register('boxicons')
        ->asset('https://unpkg.com/boxicons@2.1.4/css/boxicons.min.css')
        ->template('<i class="{ ICON }"></i>', 'text-xl', 'text-sm')
        ->icons([
            "bx bx-accessibility",
            "bx bx-add-to-queue",
            "bx bx-adjust"
        ])  
        ->replace(['bx ', 'bxs-', 'bxl-', 'bx-'])
        ->save();
}

than you need to clear cache by use this command

php artisan filament-icons:clear

you can try add Box Icons using this snap Box Icon Snap

Publish Assets

you can publish views file by use this command

php artisan vendor:publish --tag="filament-icons-views"

Publish Config

you can publish config file by use this command

php artisan vendor:publish --tag="filament-icons-config"

Support

you can join our discord server to get support TomatoPHP

Docs

you can check docs of this package on Docs

Changelog

Please see CHANGELOG for more information on what has changed recently.

Security

Please see SECURITY for more information about security.

Credits

License

The MIT License (MIT). Please see License File for more information.