PHPackages                             dmstr/yii2-ajax-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. dmstr/yii2-ajax-button

ActiveYii2-extension[Utility &amp; Helpers](/categories/utility)

dmstr/yii2-ajax-button
======================

Widget to manage ajax calls for Yii2 Framework

1.0.2(4y ago)456.3k—0%31BSD-3-ClausePHP

Since Oct 12Pushed 4y ago4 watchersCompare

[ Source](https://github.com/dmstr/yii2-ajax-button)[ Packagist](https://packagist.org/packages/dmstr/yii2-ajax-button)[ Docs](https://github.com/dmstr/yii2-ajax-button)[ RSS](/packages/dmstr-yii2-ajax-button/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (1)Versions (4)Used By (1)

Yii 2 Ajax Button
=================

[](#yii-2-ajax-button)

Yii 2 Ajax Button based on "JQuery". Widget to manage ajax calls for Yii2 Framework

USAGE
-----

[](#usage)

Example usage of ajax button widget

Basic usage

```
dmstr\ajaxbutton\AjaxButton::widget([
  'method' => 'get',
  'url' => ['/path/to/action','name' => 'key']
]);

```

Advanced usage

```
dmstr\ajaxbutton\AjaxButton::widget([
 'method' => 'post',
 'params' => ['status' => 'active'],
 'url' => ['/path/to/action'],
 'options' => ['class' => 'btn btn-primary'],
 'errorExpression' => new JsExpression('function(resp,status,xhr) {if (xhr.status === 200) {button.html("Success")}}'),
 'successExpression' => new JsExpression('function(xhr) {if (xhr.status === 404) {button.html("Error");console.error(xhr.responseJSON)}}')
]);

```

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

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download).

Add repository url to the required section of your `composer.json` file.

```
"repositories": [
    {
        "type": "git",
        "url": "https://github.com/dmstr/yii2-ajax-button.git"
    }
],

```

Either run

`php composer.phar require dmstr/yii2-ajax-button` or `composer require dmstr/yii2-ajax-button`

or add

```
"dmstr/yii2-ajax-button": "*"

```

to the required section of your `composer.json` file.

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity35

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 60% 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 ~651 days

Total

3

Last Release

1473d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3b4ab2b6685ec71887908ec8cff261a16cd5bb24c69bb8ab52840e220f175f9d?d=identicon)[schmunk](/maintainers/schmunk)

---

Top Contributors

[![eluhr](https://avatars.githubusercontent.com/u/13000805?v=4)](https://github.com/eluhr "eluhr (3 commits)")[![ahalejcio](https://avatars.githubusercontent.com/u/3721525?v=4)](https://github.com/ahalejcio "ahalejcio (1 commits)")[![schmunk42](https://avatars.githubusercontent.com/u/649031?v=4)](https://github.com/schmunk42 "schmunk42 (1 commits)")

---

Tags

cmsyii2extension

### Embed Badge

![Health badge](/badges/dmstr-yii2-ajax-button/health.svg)

```
[![Health](https://phpackages.com/badges/dmstr-yii2-ajax-button/health.svg)](https://phpackages.com/packages/dmstr-yii2-ajax-button)
```

###  Alternatives

[vyants/yii2-daemon

Extension provides functionality for simple daemons creation and control

7859.0k](/packages/vyants-yii2-daemon)[dmstr/yii2-cookie-consent

Yii2 Cookie Consent Widget

1452.6k](/packages/dmstr-yii2-cookie-consent)[richardfan1126/yii2-js-register

Yii2 widget to register JS into view

1357.2k7](/packages/richardfan1126-yii2-js-register)

PHPackages © 2026

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