PHPackages                             branchonline/yii2-sweetalert - 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. branchonline/yii2-sweetalert

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

branchonline/yii2-sweetalert
============================

SweetAlert widget for Yii2

1.0.1(10y ago)11.7k1Apache-2.0PHP

Since May 13Pushed 10y ago5 watchersCompare

[ Source](https://github.com/BranchOnline/yii2-sweetalert)[ Packagist](https://packagist.org/packages/branchonline/yii2-sweetalert)[ RSS](/packages/branchonline-yii2-sweetalert/feed)WikiDiscussions master Synced 1mo ago

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

SweetAlert Widget for Yii 2
===========================

[](#sweetalert-widget-for-yii-2)

- SweetAlert widget based on SweetAlert extension

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

[](#installation)

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

Either run

```
php composer.phar require --prefer-dist branchonline/yii2-sweetalert "*"

```

or add

```
"branchonline/yii2-sweetalert": "*"
```

to the require section of your composer.json.

Usage
-----

[](#usage)

Once the extension is installed, simply add widget to your page as follows:

1. Default usage, render all flash messages stored in session flash via Yii::$app-&gt;session-&gt;setFlash().

```
echo SweetAlert::widget();
```

2. Custom usage example:

```
echo SweetAlert::widget([
          'useSessionFlash' => false,
          'options' => [
               'title' => 'Success message',
               'type' => 'Success',
               'text' => "You will not be able to recover this imaginary file!",
               'confirmButtonText'  => "Yes, delete it!",
               'cancelButtonText' =>  "No, cancel plx!"
          ]
]);
```

More info
---------

[](#more-info)

More info about the SweetAlert can be found on [options page](http://tristanedwards.me/sweetalert)

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity64

Established project with proven stability

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

Total

2

Last Release

3826d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/8556324?v=4)[Jap](/maintainers/JapMul)[@JapMul](https://github.com/JapMul)

---

Tags

yii2module

### Embed Badge

![Health badge](/badges/branchonline-yii2-sweetalert/health.svg)

```
[![Health](https://phpackages.com/badges/branchonline-yii2-sweetalert/health.svg)](https://phpackages.com/packages/branchonline-yii2-sweetalert)
```

###  Alternatives

[branchonline/yii2-lightbox

Lightbox widget for Yii2

13139.0k1](/packages/branchonline-yii2-lightbox)[akiraz2/yii2-ticket-support

Yii2 Support Ticket Module, easy, flexible, fast

611.7k](/packages/akiraz2-yii2-ticket-support)

PHPackages © 2026

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