PHPackages                             marqu3s/yii2-sweet-alert - 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. marqu3s/yii2-sweet-alert

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

marqu3s/yii2-sweet-alert
========================

Alert widget based on SweetAlert extension {@link http://tristanedwards.me/sweetalert)

v1.0.0(8y ago)2326Apache-2.0PHP

Since Sep 18Pushed 1y ago2 watchersCompare

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

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

Alert Widget for Yii 2
======================

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

- Alert widget based on SweetAlert extension
- Forked from [yii2mod/yii2-sweet-alert](https://github.com/yii2mod/yii2-sweet-alert) and adapted to suit my needs.

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

[](#installation)

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

Either run

```
php composer.phar require --prefer-dist marqu3s/yii2-sweet-alert "*"

```

or add

```
"marqu3s/yii2-sweet-alert": "*"
```

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 Alert::widget();
```

2. Custom usage example:

```
echo Alert::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!"
          ]
]);
```

Alert Options
-------------

[](#alert-options)

You can find them on the [options page](http://tristanedwards.me/sweetalert)

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance27

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 94.1% 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

Unknown

Total

1

Last Release

3164d ago

### Community

Maintainers

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

---

Top Contributors

[![marqu3s](https://avatars.githubusercontent.com/u/2284983?v=4)](https://github.com/marqu3s "marqu3s (16 commits)")[![renatocassino](https://avatars.githubusercontent.com/u/5348316?v=4)](https://github.com/renatocassino "renatocassino (1 commits)")

---

Tags

yii2module

### Embed Badge

![Health badge](/badges/marqu3s-yii2-sweet-alert/health.svg)

```
[![Health](https://phpackages.com/badges/marqu3s-yii2-sweet-alert/health.svg)](https://phpackages.com/packages/marqu3s-yii2-sweet-alert)
```

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