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

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

drexlerux/yii2-bootstrap-sweetalert
===================================

Alert widget based on bootstrap-sweetalert extension {@link http://lipis.github.io/bootstrap-sweetalert/)

v1.0.1(8y ago)047MITPHP

Since Sep 10Pushed 8y agoCompare

[ Source](https://github.com/drexlerux/yii2-bootstrap-sweetalert)[ Packagist](https://packagist.org/packages/drexlerux/yii2-bootstrap-sweetalert)[ RSS](/packages/drexlerux-yii2-bootstrap-sweetalert/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependencies (1)Versions (3)Used By (0)

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

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

- Alert widget based on bootstrap-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 drexlerux/yii2-bootstrap-sweetalert "*"

```

or add

```
"drexlerux/yii2-bootstrap-sweetalert": "*"
```

to the require section of your composer.json.

Usage
-----

[](#usage)

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

```
echo \drexlerux\sweetalert\SweetAlert::widget([
        'type' => \drexlerux\sweetalert\SweetAlert::TYPE_WARNING,
        'options' => [
            'title' => 'Warning message',
            'text' => "Do you want to delete it?",
            'confirmButtonText'  => "Yes, delete it!",
            'cancelButtonText' =>  "No, cancel plx!"
        ]
]);
```

Overrid Confirm
---------------

[](#overrid-confirm)

SweetAlertAsset overrides javascript confirm dialog by default. If you want to keep default edit your config.php

```
'assetManager' => [
    'bundles' => [
        'drexlerux\sweetalert\SweetAlertAsset' => [
            'overrideConfirm' => false
        ]
    ]
]
```

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

[](#alert-options)

You can find them on the [options page](http://lipis.github.io/bootstrap-sweetalert/)

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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 ~0 days

Total

2

Last Release

3215d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/29631825?v=4)[Carlos Porras](/maintainers/drexlerux)[@drexlerux](https://github.com/drexlerux)

---

Top Contributors

[![drexlerux](https://avatars.githubusercontent.com/u/29631825?v=4)](https://github.com/drexlerux "drexlerux (3 commits)")

---

Tags

yii2modulebootstrapsweetalert

### Embed Badge

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

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

###  Alternatives

[hiqdev/yii2-language

Yii2 module for language switching

1026.3k1](/packages/hiqdev-yii2-language)[vova07/yii2-start-comments-module

The comments module for Yii2-Start application.

149.5k1](/packages/vova07-yii2-start-comments-module)

PHPackages © 2026

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