PHPackages                             archilex/filament-toggle-icon-column - 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. [Admin Panels](/categories/admin)
4. /
5. archilex/filament-toggle-icon-column

ActiveLibrary[Admin Panels](/categories/admin)

archilex/filament-toggle-icon-column
====================================

A toggle icon column for Filament

v3.2.0(1y ago)53626.3k↓17.3%6[1 issues](https://github.com/archilex/filament-toggle-icon-column/issues)[3 PRs](https://github.com/archilex/filament-toggle-icon-column/pulls)1MITPHPPHP ^8.1CI passing

Since Apr 15Pushed 1mo ago2 watchersCompare

[ Source](https://github.com/archilex/filament-toggle-icon-column)[ Packagist](https://packagist.org/packages/archilex/filament-toggle-icon-column)[ Docs](https://github.com/archilex/filament-toggle-icon-column)[ GitHub Sponsors](https://github.com/archilex)[ RSS](/packages/archilex-filament-toggle-icon-column/feed)WikiDiscussions 3.x Synced 1mo ago

READMEChangelog (10)Dependencies (7)Versions (39)Used By (1)

A Toggle Icon Column for Filament
=================================

[](#a-toggle-icon-column-for-filament)

While developing [Advanced Tables (formerly Filter Sets)](https://filamentphp.com/plugins/kenneth-sese-advanced-tables), a premium Filament plugin that lets you save your existing filters into one easily accessible filter set, I needed a toggleable icon column to give users an easy way to see the status of their filter sets and interact with them as well. Out of this, Toggle Icon Column was born.

Toggle Icon Column is a mashup of Filament's interactive Toggle Column and the Icon Column allowing an **icon** to be toggled on or off in a table, with different icons and colors representing it's different states.

It should be noted that Filament's current [Toggle Column](https://filamentphp.com/docs/3.x/tables/columns/toggle) is a more obvious and intuitive UX for most people and even supports [icons in the toggle button](https://filamentphp.com/docs/3.x/forms/fields/toggle#adding-icons-to-the-toggle-button). However, for some, like myself, Toggle Icon Column will give you a great way to add some visual distinction to your tables.

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require archilex/filament-toggle-icon-column
```

Optionally, you can publish the views using

```
php artisan vendor:publish --tag="filament-toggle-icon-column-views"
```

Filament v3 recommends developers [create a custom theme](https://filamentphp.com/docs/3.x/panels/themes#creating-a-custom-theme) to better support a plugin's additional Tailwind classes. After you have created your custom theme, add Toggle Icon Columns' views to your *new theme's* `tailwind.config.js` file usually located in `resources/css/filament/admin/tailwind.config.js`:

```
content: [
    ...
    './vendor/archilex/filament-toggle-icon-column/**/*.php',
],
```

Next, compile your theme:

```
npm run build
```

Finally, run the Filament upgrade command:

```
php artisan filament:upgrade
```

Usage
-----

[](#usage)

```
use Archilex\ToggleIconColumn\Columns\ToggleIconColumn;

return $table
    ->columns([
        ToggleIconColumn::make('is_active'),
    ]);
```

### Customizing the icon

[](#customizing-the-icon)

You may customize the icon representing each state. Heroicons v2 are supported at this time:

```
use Archilex\ToggleIconColumn\Columns\ToggleIconColumn;

ToggleIconColumn::make('is_locked')
    ->onIcon('heroicon-s-lock-open')
    ->offIcon('heroicon-o-lock-closed')
```

### Customizing the size

[](#customizing-the-size)

The default icon size is `lg`, but you may customize the size to be either `xs`, `sm`, `md`, `lg` or `xl`:

```
use Archilex\ToggleIconColumn\Columns\ToggleIconColumn;

ToggleIconColumn::make('is_locked')
    ->size('xl')
```

### Customizing the color

[](#customizing-the-color)

You may customize the icon color representing the `on` or `off` state. These may be either `primary`, `secondary`, `success`, `info`, `warning`, `danger`, or `secondary`:

```
use Archilex\ToggleIconColumn\Columns\ToggleIconColumn;

ToggleIconColumn::make('is_locked')
    ->onColor('primary')
    ->offColor('secondary')
```

### Customizing the hover color

[](#customizing-the-hover-color)

By default the hover color will be the inverse of the `on/off` colors. These may also be customized to be either `primary`, `secondary`, `success`, `info`, `warning`, `danger`, or `secondary`.

```
use Archilex\ToggleIconColumn\Columns\ToggleIconColumn;

ToggleIconColumn::make('is_locked')
    ->hoverColor('success')
```

For further customization you can call a `Closure`.

```
use Archilex\ToggleIconColumn\Columns\ToggleIconColumn;

ToggleIconColumn::make('is_locked')
    ->hoverColor(fn (Model $record) => $record->is_locked ? 'text-gray-300' : 'text-success-500'),
```

### Other options

[](#other-options)

As ToggleIconColumn extends Filament's `Column` class, most other methods are available as well such as:

```
use Archilex\ToggleIconColumn\Columns\ToggleIconColumn;

ToggleIconColumn::make('is_bookmarked')
    ->label('Bookmark status')
    ->translateLabel()
    ->alignCenter()
    ->disabled(fn () => ! auth()->user()->isAdmin())
    ->tooltip(fn (Model $record) => $record->is_bookmarked ? 'Unbookmark' : 'Bookmark')
    ->sortable()
```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Other Filament Plugins
----------------------

[](#other-filament-plugins)

Check out my other Filament Plugins:

- [Advanced Tables (formerly Filter Sets)](https://filamentphp.com/plugins/kenneth-sese-filter-sets): Let your users combine their filters, searches, column order, and more into convenient and easily accessible filter sets.
- [Stacked Image Column](https://filamentphp.com/plugins/kenneth-sese-stacked-image-column): Display multiple images as a stack in your Filament tables.

Credits
-------

[](#credits)

- [Kenneth Sese](https://github.com/archilex)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

54

—

FairBetter than 97% of packages

Maintenance69

Regular maintenance activity

Popularity51

Moderate usage in the ecosystem

Community16

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 78.8% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~34 days

Recently: every ~198 days

Total

30

Last Release

126d ago

Major Versions

v1.0.5 → v2.0.0-alpha12023-05-08

v1.0.6 → v2.0.0-alpha32023-05-09

1.x-dev → v3.0.02023-09-22

2.x-dev → v3.0.12023-10-04

PHP version history (2 changes)v1.0.0PHP ^8.0

v3.0.2PHP ^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/5fbbb75d643cb60e6f628ad9e33897dc4938318f47312f16b223d638fcb620a7?d=identicon)[archilex](/maintainers/archilex)

---

Top Contributors

[![archilex](https://avatars.githubusercontent.com/u/6097099?v=4)](https://github.com/archilex "archilex (78 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (12 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (9 commits)")

---

Tags

laraveltablesadmin-panelcolumnarchilexfilament-toggle-icon-column

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/archilex-filament-toggle-icon-column/health.svg)

```
[![Health](https://phpackages.com/badges/archilex-filament-toggle-icon-column/health.svg)](https://phpackages.com/packages/archilex-filament-toggle-icon-column)
```

###  Alternatives

[archilex/filament-stacked-image-column

Display multiple images as a stack in your Filament tables

438.0k](/packages/archilex-filament-stacked-image-column)[guava/filament-knowledge-base

A filament plugin that adds a knowledge base and help to your filament panel(s).

206120.5k1](/packages/guava-filament-knowledge-base)[ralphjsmit/laravel-filament-seo

A package to combine the power of Laravel SEO and Filament Admin.

15398.7k10](/packages/ralphjsmit-laravel-filament-seo)[geo-sot/filament-env-editor

Access .env file though Filament admin panel

2432.3k1](/packages/geo-sot-filament-env-editor)[mradder/filament-logger

Audit logging, activity tracking, exports, alerts, and dashboards for Filament admin panels.

141.1k](/packages/mradder-filament-logger)[mohammadhprp/filament-ip-to-country-flag-column

Display Country flag from IP address in your Filament tables

2217.4k](/packages/mohammadhprp-filament-ip-to-country-flag-column)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
