PHPackages                             ediger86/yii2-sweetalert2-widget - 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. ediger86/yii2-sweetalert2-widget

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

ediger86/yii2-sweetalert2-widget
================================

Fork of Dominus77 SweetAlert widget that uses Bootstrap 5

v1.3.8(6y ago)07MITPHP

Since May 2Pushed 4y agoCompare

[ Source](https://github.com/ediger86/yii2-sweetalert2-widget)[ Packagist](https://packagist.org/packages/ediger86/yii2-sweetalert2-widget)[ Patreon](https://www.patreon.com/dominus77)[ RSS](/packages/ediger86-yii2-sweetalert2-widget/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (6)Versions (19)Used By (0)

yii2-sweetalert2-widget
=======================

[](#yii2-sweetalert2-widget)

[![Latest Version](https://camo.githubusercontent.com/36c58cbbdbee791e731068712499d3e6a39619b78f054a1f460e2c339c3c3797/68747470733a2f2f706f7365722e707567782e6f72672f646f6d696e757337372f796969322d7377656574616c657274322d7769646765742f762f737461626c65)](https://packagist.org/packages/dominus77/yii2-sweetalert2-widget)[![Software License](https://camo.githubusercontent.com/d35ecf6a7e86f5eeeee921a4bd24662097d43424c105e33463ff031785eb7210/68747470733a2f2f706f7365722e707567782e6f72672f646f6d696e757337372f796969322d7377656574616c657274322d7769646765742f6c6963656e7365)](https://github.com/Dominus77/yii2-sweetalert2-widget/blob/master/LICENSE.md)[![Build Status](https://camo.githubusercontent.com/06b248d445bfa843a73da970b2e051948ceba4be1e7c108e6d72b83e7806fe72/68747470733a2f2f7472617669732d63692e6f72672f446f6d696e757337372f796969322d7377656574616c657274322d7769646765742e7376673f6272616e63683d76312e332e34)](https://travis-ci.org/Dominus77/yii2-sweetalert2-widget)[![codecov](https://camo.githubusercontent.com/4cfc855f24e5ab597a6bda83662ec13702da6dd89adf63b281d7ef246b5533ad/68747470733a2f2f636f6465636f762e696f2f67682f446f6d696e757337372f796969322d7377656574616c657274322d7769646765742f6272616e63682f6d61737465722f67726170682f62616467652e737667)](https://codecov.io/gh/Dominus77/yii2-sweetalert2-widget)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/0030e320ef62d28083529044239fa2477222d91d2b76e4fbb128770316afadfd/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f446f6d696e757337372f796969322d7377656574616c657274322d7769646765742f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/Dominus77/yii2-sweetalert2-widget/?branch=master)[![Total Downloads](https://camo.githubusercontent.com/0b27c93e5baa9579a1bbb78d6bfc6998f17f54673c35b15a603afa05431d3485/68747470733a2f2f706f7365722e707567782e6f72672f646f6d696e757337372f796969322d7377656574616c657274322d7769646765742f646f776e6c6f616473)](https://packagist.org/packages/dominus77/yii2-sweetalert2-widget)[![SensioLabsInsight](https://camo.githubusercontent.com/cf00405393dd7375f8a89971b538910e63fbf9276698480b548c8583c1052ccd/68747470733a2f2f696e73696768742e73656e73696f6c6162732e636f6d2f70726f6a656374732f34333936613033342d336431382d343464632d613263662d6537663564353632313730342f6d696e692e706e67)](https://insight.sensiolabs.com/projects/4396a034-3d18-44dc-a2cf-e7f5d5621704)

Renders a [SweetAlert2](https://sweetalert2.github.io/) widget for Yii2.

[![Logo SweetAlert2](/swal2-logo.png)](/swal2-logo.png)

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

[](#installation)

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

Either run

```
php composer.phar require dominus77/yii2-sweetalert2-widget "~1.3"

```

or add

```
"dominus77/yii2-sweetalert2-widget": "~1.3"

```

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

Usage
-----

[](#usage)

Once the extension is installed, simply use it in your code by:

Flash message
-------------

[](#flash-message)

View:

```

```

Controller:

```

```

A warning message, with a function attached to the "Confirm"-button...

```
