PHPackages                             alizharb/filament-game-icons - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. alizharb/filament-game-icons

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

alizharb/filament-game-icons
============================

Game Icons Pack ready for Filament 4

v1.0.12(8mo ago)4302MITPHPPHP ^8.1

Since Aug 30Pushed 7mo agoCompare

[ Source](https://github.com/AlizHarb/filament-game-icons)[ Packagist](https://packagist.org/packages/alizharb/filament-game-icons)[ RSS](/packages/alizharb-filament-game-icons/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (4)Versions (14)Used By (0)

🎮 Filament Game Icons
=====================

[](#-filament-game-icons)

**The ultimate Game Icons collection for FilamentPHP**

[![Latest Version](https://camo.githubusercontent.com/82ae88108ed446af1ccfc387c5c3d19a0a9c27316ded5915f49b372ba9148d0f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f616c697a686172622f66696c616d656e742d67616d652d69636f6e732e7376673f7374796c653d666f722d7468652d6261646765266c6f676f3d7061636b6167697374)](https://packagist.org/packages/alizharb/filament-game-icons)[![Total Downloads](https://camo.githubusercontent.com/ddb177d23579b4a71c1b3536512791602b94a7b1863d5ef1263fdf1f60d636af/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f616c697a686172622f66696c616d656e742d67616d652d69636f6e732e7376673f7374796c653d666f722d7468652d6261646765266c6f676f3d7061636b6167697374)](https://packagist.org/packages/alizharb/filament-game-icons)[![License](https://camo.githubusercontent.com/31e62e0eff03ce9ddfdf69d8476340d4f541990bfb152cb02a0f342965252997/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e7376673f7374796c653d666f722d7468652d6261646765)](LICENSE)[![PHP Version](https://camo.githubusercontent.com/1c0dcf90faf789087129b172caa080593f3891912675a1aebd09ec590cb14301/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f616c697a686172622f66696c616d656e742d67616d652d69636f6e733f7374796c653d666f722d7468652d6261646765266c6f676f3d706870)](https://packagist.org/packages/alizharb/filament-game-icons)

[![Code Quality](https://camo.githubusercontent.com/26c50e3f9beaa65de5376956593b2fa2b2b83d53e635dd97537fcc0585516c66/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f7175616c6974792f672f616c697a686172622f66696c616d656e742d67616d652d69636f6e733f7374796c653d666f722d7468652d6261646765266c6f676f3d7363727574696e697a6572)](https://scrutinizer-ci.com/g/alizharb/filament-game-icons)[![FilamentPHP](https://camo.githubusercontent.com/7a90ff4bb04f2df970d41542fbdcd3e260a6cbf58528ccf3a4af54b6c2aeb503/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f46696c616d656e745048502d342e782d4646363731393f7374796c653d666f722d7468652d6261646765266c6f676f3d646174613a696d6167652f7376672b786d6c3b6261736536342c50484e325a79423361575230614430694d6a51694947686c6157646f644430694d6a516949485a705a58644362336739496a41674d4341794e4341794e4349675a6d6c7362443069626d39755a53496765473173626e4d39496d6830644841364c79393364336375647a4d7562334a6e4c7a49774d44417663335a6e496a344b50484268644767675a4430695454457949444a4d4d544d754d446b674f4334794e6b77794d4341355444457a4c6a4135494445314c6a63305444457949444979544445774c6a6b78494445314c6a6330544451674f5577784d4334354d5341344c6a49325444457949444a614969426d6157787350534a6a64584a795a57353051323973623349694c7a344b5043397a646d632b)](https://filamentphp.com)

*Transform your FilamentPHP applications with 4000+ beautiful game icons*

[📖 Documentation](#-documentation) • [🚀 Quick Start](#-quick-start) • [💡 Examples](#-examples) • [🤝 Contributing](#-contributing)

---

✨ Features
----------

[](#-features)

### 🎯 **Core Features**

[](#-core-features)

- 🎮 **4000+ Game Icons** - Complete collection from game-icons.net
- 🔧 **Type Safe** - Full PHP enum with IDE autocompletion
- 🏷️ **Human Readable** - Implements `HasLabel` for better UX
- 📦 **Zero Config** - Works out of the box
- ⚡ **Optimized** - Blazing fast with smart caching

### 🛠️ **Developer Experience**

[](#️-developer-experience)

- 🔍 **Searchable** - Built-in search and categorization
- 🎨 **Customizable** - Easy theming and icon replacement
- 📱 **Responsive** - Looks great on all devices
- 🔄 **Auto-sync** - Keep icons updated automatically
- 💡 **IntelliSense** - Full IDE support

---

🚀 Quick Start
-------------

[](#-quick-start)

### Installation

[](#installation)

Install the package via Composer:

```
composer require alizharb/filament-game-icons
```

### Asset Registration

[](#asset-registration)

Register the assets with FilamentPHP:

```
php artisan filament:assets
```

### Basic Usage

[](#basic-usage)

Start using Game Icons immediately in any FilamentPHP component:

```
use Alizharb\FilamentGameIcons\Enums\GameIcons;
use Filament\Actions\Action;

Action::make('attack')
    ->icon(GameIcons::Sword)
    ->label('Attack with Sword')
    ->color('danger');
```

---

📖 Documentation
---------------

[](#-documentation)

### 🏗️ **Architecture Overview**

[](#️-architecture-overview)

 ```
graph TD
    A[FilamentPHP Application] --> B[Filament Game Icons Package]
    B --> C[GameIcons Enum]
    B --> D[Blade Game Icons]
    D --> E[Game Icons SVG Collection]

    C --> F[Type Safety]
    C --> G[IDE Autocompletion]
    C --> H[Search & Categories]

    style A fill:#FF6719
    style B fill:#3B82F6
    style E fill:#10B981
```

      Loading ### 🎯 **Component Integration**

[](#-component-integration)

**📋 Actions &amp; Buttons**```
use Alizharb\FilamentGameIcons\Enums\GameIcons;
use Filament\Actions\Action;

// Basic action with icon
Action::make('attack')
    ->icon(GameIcons::Sword)
    ->color('danger')
    ->requiresConfirmation();

// Grouped actions
Action::make('combat_menu')
    ->icon(GameIcons::CrossedSwords)
    ->actions([
        Action::make('attack')->icon(GameIcons::Sword),
        Action::make('defend')->icon(GameIcons::Shield),
        Action::make('cast_spell')->icon(GameIcons::MagicSwirl),
    ]);
```

**📝 Form Components**```
use Filament\Forms\Components\{Select, Toggle, Radio, Checkbox};

// Enhanced select with searchable icons
Select::make('character_class')
    ->options(GameIcons::getCharactersArray())
    ->searchable()
    ->native(false)
    ->allowHtml()
    ->placeholder('Choose your character class...');

// Toggle with custom icons
Toggle::make('is_magical')
    ->onIcon(GameIcons::MagicSwirl)
    ->offIcon(GameIcons::Sword)
    ->onColor('primary')
    ->offColor('gray');

// Radio with descriptions
Radio::make('weapon_preference')
    ->options(GameIcons::getWeaponsArray())
    ->descriptions([
        GameIcons::Sword->value => 'Balanced attack and defense',
        GameIcons::BowArrow->value => 'Long-range precision strikes',
        GameIcons::MagicSwirl->value => 'Powerful elemental damage',
    ]);
```

**📊 Table Columns**```
use Filament\Tables\Columns\{IconColumn, TextColumn};

// Dynamic status icons
IconColumn::make('player_status')
    ->icon(fn ($record): string => match ($record->status) {
        'online' => GameIcons::Person->value,
        'in_battle' => GameIcons::CrossedSwords->value,
        'resting' => GameIcons::Sleep->value,
        'offline' => GameIcons::Skull->value,
    })
    ->color(fn ($record): string => match ($record->status) {
        'online' => 'success',
        'in_battle' => 'warning',
        'resting' => 'info',
        'offline' => 'gray',
    })
    ->tooltip(fn ($record): string => "Player is {$record->status}");

// Equipment column with multiple icons
TextColumn::make('equipment')
    ->formatStateUsing(function ($record): string {
        $icons = [];
        if ($record->weapon) $icons[] = GameIcons::Sword->value;
        if ($record->armor) $icons[] = GameIcons::Armor->value;
        if ($record->magic_item) $icons[] = GameIcons::MagicSwirl->value;

        return view('components.icon-list', compact('icons'))->render();
    });
```

**📱 Widgets &amp; Dashboard**```
use Filament\Widgets\StatsOverviewWidget as BaseWidget;
use Filament\Widgets\StatsOverviewWidget\Stat;

class GameDashboardWidget extends BaseWidget
{
    protected function getStats(): array
    {
        return [
            Stat::make('👥 Active Players', $this->getActivePlayers())
                ->description('Currently online')
                ->descriptionIcon(GameIcons::Person->value)
                ->chart([7, 2, 10, 3, 15, 4, 17])
                ->color('success'),

            Stat::make('⚔️ Battles Today', $this->getBattlesToday())
                ->description('32% increase from yesterday')
                ->descriptionIcon(GameIcons::CrossedSwords->value)
                ->color('warning'),

            Stat::make('🏆 Achievements', $this->getAchievements())
                ->description('Unlocked this week')
                ->descriptionIcon(GameIcons::Trophy->value)
                ->color('primary'),

            Stat::make('💰 Gold Earned', number_format($this->getGoldEarned()))
                ->description('Total server economy')
                ->descriptionIcon(GameIcons::GoldStack->value)
                ->color('warning'),
        ];
    }
}
```

---

🗂️ Icon Categories
------------------

[](#️-icon-categories)

CategoryCountExamplesUsage**⚔️ Weapons**500+`Sword`, `BowArrow`, `Shield`, `Axe`Combat systems, inventory**🔮 Magic**300+`MagicSwirl`, `HealingPotion`, `Rune`Spell systems, enchantments**👤 Characters**200+`Wizard`, `Warrior`, `Archer`, `Rogue`Character selection, classes**🐉 Creatures**400+`Dragon`, `Wolf`, `Phoenix`, `Demon`Bestiary, enemy systems**💎 Items**600+`Armor`, `Crown`, `Gem`, `Treasure`Inventory, rewards**🎲 Dice &amp; Gaming**50+`D4`, `D6`, `D20`, `Cards`Game mechanics, RNG**🏰 Environment**300+`Castle`, `Forest`, `Cave`, `Tower`World building, locations**⚙️ Interface**200+`Settings`, `Menu`, `Save`, `Load`UI elements, navigation

---

💡 Examples
----------

[](#-examples)

### 🎮 Complete Gaming Resource

[](#-complete-gaming-resource)

**Character Management System**```
