Bootstrap Icons

Replace every icon in your Filament panel with Bootstrap Icons, in regular or fill style, including the rich editor toolbar and multi-factor auth. All 2,078 icons as an enum, one line of setup.

4.x 5.x
Bootstrap Icons

What it does

Swaps every icon Filament draws for its Bootstrap Icons counterpart, in one line. That covers the sidebar, tables, forms, actions, notifications and the user menu, and also the parts icon packs usually miss: the rich editor toolbar, multi-factor auth, callouts and the query builder. All 223 icon aliases in Filament 5 are mapped. All 2,078 Bootstrap icons are available as a PHP enum, so you can use them in your own resources too.

Requirements

  • PHP 8.2+
  • Filament v4 or v5

Installation

Install the package with Composer:

composer require filafly/filament-bootstrap-icons

Then register the plugin in your Filament panel provider:

use Filafly\Icons\Bootstrap\BootstrapIcons;

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

That's it: reload the panel and every Heroicon is replaced.

Regular or fill

Bootstrap Icons come in a regular style (the default) and a fill style. Switch the whole panel with one call:

BootstrapIcons::make()->fill();

Or keep regular icons and fill only a few:

use Filafly\Icons\Bootstrap\Enums\Bootstrap;
use Filafly\Icons\Bootstrap\Enums\BootstrapStyle;
use Filament\Actions\View\ActionsIconAlias;

BootstrapIcons::make()
    ->overrideStyleForAlias(ActionsIconAlias::DELETE_ACTION, BootstrapStyle::Fill)
    ->overrideStyleForIcon(Bootstrap::Trash, BootstrapStyle::Fill);

Only icons that Bootstrap draws in both styles switch; the rest, such as the editor toolbar icons, stay the same.

Using the icons in your own resources

use Filafly\Icons\Bootstrap\Enums\Bootstrap;

protected static string | BackedEnum | null $navigationIcon = Bootstrap::People;

Overriding individual icons

Change the icon for a Filament alias

use Filafly\Icons\Bootstrap\BootstrapIcons;
use Filafly\Icons\Bootstrap\Enums\Bootstrap;
use Filament\Tables\View\TablesIconAlias;
use Filament\View\PanelsIconAlias;

// One alias
BootstrapIcons::make()->overrideAlias(TablesIconAlias::ACTIONS_FILTER, Bootstrap::Filter);

// Several aliases at once
BootstrapIcons::make()->overrideAliases([
    TablesIconAlias::ACTIONS_FILTER => Bootstrap::Filter,
    PanelsIconAlias::SIDEBAR_EXPAND_BUTTON => Bootstrap::ChevronDoubleRight,
]);

Replace one icon with another everywhere

// One icon
BootstrapIcons::make()->overrideIcon(Bootstrap::Trash, Bootstrap::Trash3);

// Several icons at once (PHP arrays can't use enums as keys, so use ->value)
BootstrapIcons::make()->overrideIcons([
    Bootstrap::Trash->value => Bootstrap::Trash3,
    Bootstrap::PencilSquare->value => Bootstrap::Pencil,
]);

Source and credits

The package is free and open source under the MIT license.

Have questions about Bootstrap Icons? Get help in our Discord community.

FilaFly also makes premium themes for Filament panels: Lucent, Prizm, Cypher and Citrus. Browse the themes.