Carbon Icons plugin screenshot
Dark mode ready
Multilingual support
Supports v5.x

Carbon Icons

Quickly swap out all icons used by the Filament framework with Carbon icons.

Tags: Panels Icon Set
Supported versions:
4.x
Filafly avatar Author: Filafly

Documentation

Banner

A Carbon icon set implementation for Filament, providing the full set of Carbon icons integrated with Filament's interface.

#Installation

You can install the package via composer:

composer require filafly/filament-carbon-icons

After the package is installed, you must register the plugin in your Filament Panel provider:

use Filafly\Icons\Carbon\CarbonIcons;

public function panel(Panel $panel): Panel
{
    return $panel
        ->plugin(CarbonIcons::make());
}

#Icon Styles

Carbon icons comes in a single style although there are some instances of an icon having filled or outline variants. There are no explicit style sets so this package doesn't support any global style selection.

#Override Specific Icons

You can override specific icons or aliases using the following methods:

#Override Icon Aliases

Use overrideAlias() to change which icon is used for specific Filament component aliases:

CarbonIcons::make()
    ->overrideAlias(PanelsIconAlias::SIDEBAR_EXPAND_BUTTON, Carbon::ChevronRight)
    ->overrideAlias(TablesIconAlias::FILTER_INDICATOR, Carbon::Filter);

Or use overrideAliases() to override multiple aliases at once by passing an array:

CarbonIcons::make()
    ->overrideAliases([
        PanelsIconAlias::SIDEBAR_EXPAND_BUTTON => Carbon::ChevronRight,
        TablesIconAlias::FILTER_INDICATOR => Carbon::Filter,
        ActionsIconAlias::CREATE_ACTION_BUTTON => Carbon::AddAlt,
    ]);

#Override Individual Icons

Use overrideIcon() to replace specific Carbon icons with different ones:

CarbonIcons::make()
    ->overrideIcon(Carbon::Search, Carbon::SearchAdvanced)
    ->overrideIcon(Carbon::Add, Carbon::AddAlt);

Or use overrideIcons() to override multiple icons at once by passing an array:

CarbonIcons::make()
    ->overrideIcons([
        Carbon::Search->value => Carbon::SearchAdvanced,
        Carbon::Add->value => Carbon::AddAlt,
        Carbon::Edit->value => Carbon::EditOff,
    ]);

PHP arrays do not support enums as keys so ->value is necessary if you want to reference the enum

These methods are particularly useful since Carbon icons come in a single style, allowing you to customize the icon set to better fit your application's needs.

#License

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