PHPackages                             clevyr/nova-action-button - 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. clevyr/nova-action-button

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

clevyr/nova-action-button
=========================

A Laravel Nova field to run actions.

v2.0.2(3mo ago)017.2k↓41.7%1MITVuePHP &gt;=8.1CI passing

Since Oct 25Pushed 3mo agoCompare

[ Source](https://github.com/clevyr/nova-action-button)[ Packagist](https://packagist.org/packages/clevyr/nova-action-button)[ Docs](https://github.com/pdmfc/nova-action-button)[ RSS](/packages/clevyr-nova-action-button/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (8)Dependencies (3)Versions (11)Used By (0)

Nova Action Button
==================

[](#nova-action-button)

[![Latest Version on Packagist](https://camo.githubusercontent.com/89318a857d2e242a14f66345354791d64d177b89978b9528915eb0d19fd5a694/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f636c657679722f6e6f76612d616374696f6e2d627574746f6e3f7374796c653d666c61742d737175617265)](https://packagist.org/packages/clevyr/nova-action-button)[![License](https://camo.githubusercontent.com/7ac87e116118d84070bbea7696440f29242c0d9da856f14236e992bd9146b1fa/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f636c657679722f6e6f76612d616374696f6e2d627574746f6e3f7374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/7ac87e116118d84070bbea7696440f29242c0d9da856f14236e992bd9146b1fa/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f636c657679722f6e6f76612d616374696f6e2d627574746f6e3f7374796c653d666c61742d737175617265)[![Total Downloads](https://camo.githubusercontent.com/da1fc82d6727477feb8193fd3366917d425d88b047f9dc7722d2f1d65b96a41c/68747470733a2f2f706f7365722e707567782e6f72672f636c657679722f6e6f76612d616374696f6e2d627574746f6e2f646f776e6c6f6164733f666f726d61743d666c61742d737175617265)](https://packagist.org/packages/clevyr/nova-action-button)

This package allows you to execute an action directly on your resource table view.

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

[](#installation)

```
composer require clevyr/nova-action-button
```

Usage
-----

[](#usage)

```
use App\Nova\Actions\ChangeRole;
use Pdmfc\NovaFields\ActionButton;

//...

public function fields()
{
    return [
        ActionButton::make('Action')
            ->action(ChangeRole::class, $this->id)
            //->action(new ChangeRole(), $this->id) using a new instance
    ];
}
```

The `action()` method requires two params - the action class name or a new instance, and the target resource id.

[![Basic example](images/basic_example.png)](images/basic_example.png)
----------------------------------------------------------------------

[](#)

### Disabling button

[](#disabling-button)

You can use the native Laravel nova [readonly()](https://nova.laravel.com/docs/3.0/resources/fields.html#readonly-fields) method to prevent users from clicking the button:

```
ActionButton::make('Action')
    ->action(ChangeRole::class, $this->id)
    ->readonly(function () {
        return $this->role->name === 'admin';
    })
```

[![Disabling the button](images/disable_example.png)](images/disable_example.png)

### Change the button text

[](#change-the-button-text)

To edit the button text content, use the `text()` method.

```
->text('Execute')
```

### Enable the loading animation on button and change color

[](#enable-the-loading-animation-on-button-and-change-color)

To enable the loading animation on button and change color, use `showLoadingAnimation()` and `loadingColor('#fff')` method.

```
->showLoadingAnimation()
->loadingColor('#fff') # default is #000
```

### Add a svg to the button

[](#add-a-svg-to-the-button)

In order to add a svg to the button, you first need to create a vue component containing a svg and then pass the component name to the `svg()` method.

```
->svg('VueComponentName')
```

### Change button color

[](#change-button-color)

To change button color, use `buttonColor('#21b970')` method.

```
->buttonColor('#21b970') # default is .btn-primary color
```

Caveats
-------

[](#caveats)

- Currently, in order to use this field, you still have to declare the action in your resource `actions()` method.

Changelog
---------

[](#changelog)

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

###  Health Score

48

—

FairBetter than 95% of packages

Maintenance79

Regular maintenance activity

Popularity27

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

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 ~118 days

Recently: every ~129 days

Total

8

Last Release

108d ago

Major Versions

v1.0.4 → v2.0.02025-02-11

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/826043?v=4)[Clevyr](/maintainers/clevyr)[@clevyr](https://github.com/clevyr)

---

Top Contributors

[![fritz-c](https://avatars.githubusercontent.com/u/4413963?v=4)](https://github.com/fritz-c "fritz-c (17 commits)")[![clevyr-anthony](https://avatars.githubusercontent.com/u/138018028?v=4)](https://github.com/clevyr-anthony "clevyr-anthony (11 commits)")[![msouto346](https://avatars.githubusercontent.com/u/21067326?v=4)](https://github.com/msouto346 "msouto346 (7 commits)")[![skoyah](https://avatars.githubusercontent.com/u/36083448?v=4)](https://github.com/skoyah "skoyah (3 commits)")[![felipereisdev](https://avatars.githubusercontent.com/u/7799406?v=4)](https://github.com/felipereisdev "felipereisdev (3 commits)")[![mgoncalves76](https://avatars.githubusercontent.com/u/70640840?v=4)](https://github.com/mgoncalves76 "mgoncalves76 (2 commits)")[![msoutopdmfc](https://avatars.githubusercontent.com/u/160144468?v=4)](https://github.com/msoutopdmfc "msoutopdmfc (2 commits)")[![kayacekovic](https://avatars.githubusercontent.com/u/32109756?v=4)](https://github.com/kayacekovic "kayacekovic (1 commits)")[![infostreams](https://avatars.githubusercontent.com/u/1132744?v=4)](https://github.com/infostreams "infostreams (1 commits)")[![HenriqueSPin](https://avatars.githubusercontent.com/u/12719645?v=4)](https://github.com/HenriqueSPin "HenriqueSPin (1 commits)")

---

Tags

laravelnova

###  Code Quality

TestsPHPUnit

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/clevyr-nova-action-button/health.svg)

```
[![Health](https://phpackages.com/badges/clevyr-nova-action-button/health.svg)](https://phpackages.com/packages/clevyr-nova-action-button)
```

###  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)
