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 today

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

28

—

LowBetter than 52% of packages

Maintenance45

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

428d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/96876427?v=4)[Hassan Tahseen](/maintainers/ht3aa)[@ht3aa](https://github.com/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

[stephenjude/filament-feature-flags

Filament implementation of feature flags and segmentation with Laravel Pennant.

122177.8k1](/packages/stephenjude-filament-feature-flags)[ysfkaya/filament-phone-input

A phone input component for Laravel Filament

3161.3M24](/packages/ysfkaya-filament-phone-input)[rawilk/profile-filament-plugin

Profile &amp; MFA starter kit for filament.

3914.6k](/packages/rawilk-profile-filament-plugin)[marcelweidum/filament-expiration-notice

Customize the livewire expiration notice

94135.4k5](/packages/marcelweidum-filament-expiration-notice)[stephenjude/filament-jetstream

A Laravel starter kit built with Filament inspired by Jetstream.

17760.2k3](/packages/stephenjude-filament-jetstream)[stephenjude/filament-two-factor-authentication

Filament Two Factor Authentication: Google 2FA + Passkey Authentication

84215.9k9](/packages/stephenjude-filament-two-factor-authentication)

PHPackages © 2026

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