PHPackages                             creode/collapsible-radios - 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. creode/collapsible-radios

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

creode/collapsible-radios
=========================

A single select collapsible radio button module for Laravel Nova.

1.1.0(2y ago)11241MITVuePHP ^7.3|^8.0

Since Nov 2Pushed 2y ago1 watchersCompare

[ Source](https://github.com/creode-modules/nova-collapsible-radios)[ Packagist](https://packagist.org/packages/creode/collapsible-radios)[ RSS](/packages/creode-collapsible-radios/feed)WikiDiscussions 1.x Synced 1mo ago

READMEChangelog (9)Dependencies (1)Versions (10)Used By (1)

Collapsible Radios - Laravel Nova
=================================

[](#collapsible-radios---laravel-nova)

Contains a new Laravel Nova field for building collapsible radios for parent and child relationships.

[![Field in use](https://github.com/creode-modules/nova-collapsible-radios/raw/1.x/docs/images/folder-example.png?raw=true, "Image of hierarchy showing the field in use.")](https://github.com/creode-modules/nova-collapsible-radios/blob/1.x/docs/images/folder-example.png?raw=true,)

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

[](#installation)

You can install the package via composer:

```
composer require creode/collapsible-radios
```

Usage
-----

[](#usage)

To create an instance of a new field just use the `CollapsibleRadios` class in your Nova resource's `fields` method. You need to ensure that your options provide the following fields:

- `label` - The label to display for the option
- `value` - The value to use for the option
- `id` - The ID of the option
- `parent_id` - The ID of the parent option

These fields are used to build the collapsible radios based on parent\_ids.

Here is a basic example for how we would accept input for options.

```
use Creode\CollapseRadios\Field\CollapsibleRadios;

CollapsibleRadios::make('Model', 'model_id')
    ->options([
        [
            'label' => 'Option 1',
            'value' => 1,
            'id' => 1,
            'parent_id' => null,
        ],
        [
            'label' => 'Option 2',
            'value' => 2,
            'id' => 2,
            'parent_id' => 1,
        ],
                [
            'label' => 'Option 3',
            'value' => 3,
            'id' => 3,
            'parent_id' => 2,
        ]
    ])
    ->nullable()
    ->rules('required')
```

This would generate a structure like the following:

- Option 1
    - Option 2
        - Option 3

or if you want to easily map model data to it:

```
use Creode\CollapseRadios\Field\CollapsibleRadios;

CollapsibleRadios::make('Model', 'model_id')
    ->options(
        Model::all()->map(
            function ($model) {
                return [
                    'label' => $model->name,
                    'value' => $model->id,
                    'id' => $model->id,
                    'parent_id' => $model->parent_id ?: null,
                ];
            }
        )
    )
    ->nullable()
    ->rules('required')
```

Roadmap
-------

[](#roadmap)

We plan to implement the following features as our requirements develop for this project:

- Allow for a default option to be selected
- Allow for multiple options to be selected

Changelog
---------

[](#changelog)

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

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

[](#contributing)

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

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

[](#security-vulnerabilities)

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

Credits
-------

[](#credits)

- [Creode](https://github.com/creode)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 83.3% 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 ~1 days

Total

10

Last Release

909d ago

Major Versions

0.1.0 → 1.0.02023-11-02

### Community

Maintainers

![](https://www.gravatar.com/avatar/a2c2487980d2db00d0f04c71f2bb4064aa915cbd152ade22cfb79c106f3528a8?d=identicon)[creode](/maintainers/creode)

---

Top Contributors

[![jaymeh](https://avatars.githubusercontent.com/u/18261676?v=4)](https://github.com/jaymeh "jaymeh (25 commits)")[![liam-spedding](https://avatars.githubusercontent.com/u/111750536?v=4)](https://github.com/liam-spedding "liam-spedding (4 commits)")[![creode-dev](https://avatars.githubusercontent.com/u/19706903?v=4)](https://github.com/creode-dev "creode-dev (1 commits)")

---

Tags

laravelnova

### Embed Badge

![Health badge](/badges/creode-collapsible-radios/health.svg)

```
[![Health](https://phpackages.com/badges/creode-collapsible-radios/health.svg)](https://phpackages.com/packages/creode-collapsible-radios)
```

###  Alternatives

[optimistdigital/nova-sortable

This Laravel Nova package allows you to reorder models in a Nova resource's index view using drag &amp; drop.

2872.1M6](/packages/optimistdigital-nova-sortable)[outl1ne/nova-sortable

This Laravel Nova package allows you to reorder models in a Nova resource's index view using drag &amp; drop.

2861.8M9](/packages/outl1ne-nova-sortable)[optimistdigital/nova-multiselect-field

A multiple select field for Laravel Nova.

3403.5M7](/packages/optimistdigital-nova-multiselect-field)[digital-creative/conditional-container

Provides an easy way to conditionally show and hide fields in your Nova resources.

116593.8k4](/packages/digital-creative-conditional-container)[sbine/route-viewer

A Laravel Nova tool to view your registered routes.

57215.9k](/packages/sbine-route-viewer)[markwalet/nova-modal-response

A Laravel Nova asset for Modal responses on an action.

14720.0k](/packages/markwalet-nova-modal-response)

PHPackages © 2026

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