charlieetienne/toggle-buttons-column

A Filament table column component to have toggle buttons but in a table column.

Fund package maintenance!
CharlieEtienne

Installs: 2

Dependents: 0

Suggesters: 0

Security: 0

Stars: 2

Watchers: 0

Forks: 0

pkg:composer/charlieetienne/toggle-buttons-column

1.1.0 2026-01-14 20:45 UTC

This package is auto-updated.

Last update: 2026-01-14 20:47:24 UTC


README

Like Filament's ToggleButtons, but for table columns.

toggle-buttons-column-for-filament

Installation

You can install the package via composer:

composer require charlieetienne/toggle-buttons-column

Usage

Use ToggleButtonsColumn in your Filament tables:

use CharlieEtienne\ToggleButtonsColumn\ToggleButtonsColumn;

ToggleButtonsColumn::make('status')
    ->options([
        'unsigned' => 'Unsigned',
        'present' => 'Present',
        'absent' => 'Absent',
    ])
    ->icons([
        'unsigned' => Heroicon::Clock,
        'present' => Heroicon::Check,
        'absent' => Heroicon::XMark,
    ])
    ->colors([
        'unsigned' => 'warning',
        'present' => 'success',
        'absent' => 'danger',
    ]),

Using enums

Like Filament's ToggleButtons, you can use enums to define your options:

    ToggleButtonsColumn::make('status')
        ->options(OrderStatus::class)

Grouped toggle buttons

Like Filament's ToggleButtons form component, you can group your options using the grouped() method:

    ToggleButtonsColumn::make('status')
        ->grouped()
        ->options(OrderStatus::class)

Options

This column accepts all the same styling options as Filament's ToggleButtons, except for inline.

For example, you can use boolean(), grouped(), etc.

Additionally, you have access to all the editable column methods like getStateUsing(), updateStateUsing(), etc.

Requirements

  • PHP 8.2+
  • Filament 4.0+
  • Laravel 11.0+

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

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

Credits