PHPackages                             ht3aa/only-one-active-toggle - 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. ht3aa/only-one-active-toggle

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

ht3aa/only-one-active-toggle
============================

A Filament plugin that provides a toggle field that ensures only one toggle is active at a time within a repeater

v1.0.2(1y ago)13MITBladePHP ^8.1

Since May 1Pushed 1y ago1 watchersCompare

[ Source](https://github.com/ht3aa/only-one-active-toggle-filament)[ Packagist](https://packagist.org/packages/ht3aa/only-one-active-toggle)[ RSS](/packages/ht3aa-only-one-active-toggle/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (3)Dependencies (2)Versions (4)Used By (0)

Only One Active Toggle for Filament
===================================

[](#only-one-active-toggle-for-filament)

[![Only One Active Toggle](content/plugins/images/ht3aa-only-one-active-toggle.png)](content/plugins/images/ht3aa-only-one-active-toggle.png)

A Filament plugin that provides a toggle field that ensures only one toggle is active at a time within a repeater. This is achieved entirely client-side using Alpine.js, without any server-side requests.

Features
--------

[](#features)

- 🔄 **Client-Side Only**: Uses Alpine.js for all operations, no server requests needed
- 🎯 **Repeater Compatible**: Works seamlessly within Filament repeaters
- 🎨 **Theme Support**: Fully supports both light and dark themes
- 🛠️ **Customizable**: Supports all standard Filament toggle features
- ⚡ **Performance**: Lightweight and efficient implementation

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

[](#installation)

You can install the package via composer:

```
composer require ht3aa/only-one-active-toggle
```

Usage
-----

[](#usage)

This field is designed to be used inside a Filament repeater. When one toggle is activated, all other toggles in the same repeater will be automatically deactivated.

```
use Ht3aa\OnlyOneActiveToggle\Fields\OnlyOneActiveToggle;

Forms\Components\Repeater::make('items')
    ->schema([
        OnlyOneActiveToggle::make('is_active')
            ->label('Active Item'),
        // ... other fields
    ])
```

### Example

[](#example)

Here's a complete example of how to use the field in a form:

```
use Ht3aa\OnlyOneActiveToggle\Fields\OnlyOneActiveToggle;

public static function form(Form $form): Form
{
    return $form
        ->schema([
            Forms\Components\Repeater::make('items')
                ->schema([
                    Forms\Components\TextInput::make('name')
                        ->required(),
                    OnlyOneActiveToggle::make('is_active')
                        ->label('Set as Active'),
                ])
                ->columns(2),
        ]);
}
```

How It Works
------------

[](#how-it-works)

The plugin uses Alpine.js to:

1. Track the state of all toggles in the repeater
2. Automatically deactivate other toggles when one is activated
3. Handle all state changes client-side

Requirements
------------

[](#requirements)

- PHP 8.1+
- Filament 3.x
- Alpine.js (included with Filament)

Support
-------

[](#support)

If you find a bug or have a feature request, please open an issue on [GitHub](https://github.com/ht3aa/only-one-active-toggle-filament/issues).

License
-------

[](#license)

This package is open-sourced software licensed under the [MIT license](LICENSE.md).

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance48

Moderate activity, may be stable

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~0 days

Total

3

Last Release

382d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5960d0e04603296e1d859501a366241098d1a46c95f0bfc47f0541871b08cfbb?d=identicon)[ht3aa](/maintainers/ht3aa)

---

Top Contributors

[![ht3aa](https://avatars.githubusercontent.com/u/96876427?v=4)](https://github.com/ht3aa "ht3aa (13 commits)")

### Embed Badge

![Health badge](/badges/ht3aa-only-one-active-toggle/health.svg)

```
[![Health](https://phpackages.com/badges/ht3aa-only-one-active-toggle/health.svg)](https://phpackages.com/packages/ht3aa-only-one-active-toggle)
```

###  Alternatives

[guava/calendar

Adds support for vkurko/calendar to Filament PHP.

298241.0k3](/packages/guava-calendar)[datlechin/filament-menu-builder

Create and manage menus and menu items

13550.3k2](/packages/datlechin-filament-menu-builder)[marcelweidum/filament-expiration-notice

Customize the livewire expiration notice

9169.0k4](/packages/marcelweidum-filament-expiration-notice)[swisnl/filament-backgrounds

Beautiful backgrounds for Filament auth pages

54149.2k6](/packages/swisnl-filament-backgrounds)[hydrat/filament-table-layout-toggle

Filament plugin adding a toggle button to tables, allowing user to switch between Grid and Table layouts.

6292.3k1](/packages/hydrat-filament-table-layout-toggle)[codewithdennis/filament-lucide-icons

A Filament plugin that integrates Lucide icons, allowing you to use them seamlessly across Filament forms, tables, actions, and more.

4529.4k2](/packages/codewithdennis-filament-lucide-icons)

PHPackages © 2026

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