Search by

ikongdev / font-awesome

Jericho Umayam (Ikong)

Using FontAwesome Enum in Filament

Package info

github.com/Ikong217/FontAwesome

pkg:composer/ikongdev/font-awesome

Statistics

Installs: 2

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v1.1.0 2026-11-19 10:03 UTC

This package is auto-updated.

Last update: 2026-11-19 10:18:55 UTC


README

Expand your icon choices in Filament beyond the default Heroicons. This package provides a single PHP enum covering the free Font Awesome icon set (v7 metadata), built on top of owenvoke/blade-fontawesome, so you get free icons directly usable anywhere Filament accepts an icon.

Why?

Filament ships with Heroicons out of the box, which is great — but limited. owenvoke/blade-fontawesome already registers every Font Awesome Free icon as a Blade Icon component (e.g. <x-fas-cloud/>), and since Filament resolves icon strings through Blade Icons under the hood, those same component names (fas-cloud, far-bell, etc.) work directly as Filament icon values. This package just wraps them in a typed enum so you get autocomplete instead of memorizing icon slugs.

What's included

  • 1,422 Solid icons (fas-) — the full Free solid set.
  • 169 Regular/Outlined icons (far-) — generated as Outlined{Name} cases, for the subset of icons that ship an outlined counterpart.
  • Brand icons (fab-, e.g. GitHub, X/Twitter) are not included — they're a separate style family. Add a separate FontAwesomeBrand enum if you need those.

Requirements

  • PHP 8.1+
  • Laravel 12.x (per current owenvoke/blade-fontawesome requirements)
  • Filament 3.x
  • owenvoke/blade-fontawesome (see installation below)

Installation

Option 1: install via composer

Install the package and owenvoke/blade-fontawesome is already attached

composer require ikongdev/font-awesome

Option 2: Create Your Own Enum

Step 1: Donwload the file

You can Download the enum file located inside source(src) folder

Step 2: Change the namespace

after downloading, it is recommended for you to put the file inside App\Enums\ folder click to redirect to the file change the namespace using:

namespace App\Enums;

or which folder it is located on your project

Step 3: Install dependency

You must install the depenency ovenvoke/blade-fontawesome to make it work.

composer require owenvoke/blade-fontawesome

Usage

Each case's value matches the Blade Icon component name registered by owenvoke/blade-fontawesome, so you can pass it straight to Filament:

use App\Enums\FontAwesome;

Forms\Components\TextInput::make('name')
    ->prefixIcon(FontAwesome::User->value), // "fas-user"
Actions\Action::make('export')
    ->icon(FontAwesome::FileExport->value), // "fas-file-export"

You can also use the icons directly in Blade views, since they're registered Blade Icon components:

<x-fas-user class="w-5 h-5" />

Solid vs. Outlined

Most icons are solid-only, but 169 also have an outlined counterpart:

FontAwesome::Bell->hasOutline();      // true
FontAwesome::Bell->outlined();        // FontAwesome::OutlinedBell
FontAwesome::OutlinedBell->solid();   // FontAwesome::Bell

FontAwesome::User->hasOutline();      // false
FontAwesome::User->outlined();        // null

Other helpers

FontAwesome::User->iconName();     // "user"
FontAwesome::User->getIconClass(); // "fas fa-user" (for webfont/CSS-class based rendering, not Blade Icons)

Note: getIconClass() / getIconForSize() / sizeClass() target the classic Font Awesome webfont + CSS approach (useful if you're rendering icons outside of Blade Icons/Filament). For Filament and Blade usage, stick to ->value as shown above.

Contributing

Found a missing icon, a naming issue, or want to help keep this in sync with new Font Awesome releases? Contributions are welcome — feel free to open an issue or a pull request.

License

This package is open-sourced under the MIT license. Font Awesome Free icons are used under the Font Awesome Free License. Icon rendering is powered by owenvoke/blade-fontawesome, also MIT licensed.