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

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

bootstrap/sweetalert
====================

A beautiful replacement for JavaScript's alert for Bootstrap.

012.4k↓50%CSS

Since Mar 20Pushed 11y ago1 watchersCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

> If you are looking for the non-Bootstrap version refer to the original [SweetAlert project](https://github.com/t4t5/sweetalert).

SweetAlert for Bootstrap
========================

[](#sweetalert-for-bootstrap)

An awesome *replacement* for JavaScript's `alert()` made for Bootstrap.

Usage
-----

[](#usage)

On how to use these alerts, read the docs from the original [SweetAlert](http://tristanedwards.me/sweetalert) project.

The main difference here is that instead of using the `confirmButtonColor` you should use the `confirmButtonClass`. It can take any of the default Bootstrap classes for buttons like: `btn-danger`, `btn-success`, etc. The rest of the API remains exactly the same.

Also if you are using Less in your project, then instead of including the `*.css` files include the [`sweet-alert.less`](https://github.com/lipis/bootstrap-sweetalert/blob/master/lib/sweet-alert.less)in your building process. That way it will use the Bootstrap's variables to match your theme perfectly.

Development
-----------

[](#development)

```
$ npm install
$ grunt
```

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity23

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/9d40665a360eef88be50ddf2fad41317ab6378c4ef77a767f88050ab22bef402?d=identicon)[royopa](/maintainers/royopa)

---

Top Contributors

[![t4t5](https://avatars.githubusercontent.com/u/2598660?v=4)](https://github.com/t4t5 "t4t5 (53 commits)")[![lipis](https://avatars.githubusercontent.com/u/125676?v=4)](https://github.com/lipis "lipis (44 commits)")[![green-arrow](https://avatars.githubusercontent.com/u/2180127?v=4)](https://github.com/green-arrow "green-arrow (5 commits)")[![nixta](https://avatars.githubusercontent.com/u/25374?v=4)](https://github.com/nixta "nixta (4 commits)")[![connyay](https://avatars.githubusercontent.com/u/597300?v=4)](https://github.com/connyay "connyay (3 commits)")[![royopa](https://avatars.githubusercontent.com/u/442991?v=4)](https://github.com/royopa "royopa (3 commits)")[![zzarcon](https://avatars.githubusercontent.com/u/1194982?v=4)](https://github.com/zzarcon "zzarcon (2 commits)")[![holmesal](https://avatars.githubusercontent.com/u/1147390?v=4)](https://github.com/holmesal "holmesal (2 commits)")[![mkoczka](https://avatars.githubusercontent.com/u/5765432?v=4)](https://github.com/mkoczka "mkoczka (2 commits)")[![mizterp](https://avatars.githubusercontent.com/u/843041?v=4)](https://github.com/mizterp "mizterp (1 commits)")[![alexkvazos](https://avatars.githubusercontent.com/u/4448627?v=4)](https://github.com/alexkvazos "alexkvazos (1 commits)")[![jeffutter](https://avatars.githubusercontent.com/u/570037?v=4)](https://github.com/jeffutter "jeffutter (1 commits)")[![peterkos](https://avatars.githubusercontent.com/u/2782749?v=4)](https://github.com/peterkos "peterkos (1 commits)")[![rjdewberry](https://avatars.githubusercontent.com/u/5148549?v=4)](https://github.com/rjdewberry "rjdewberry (1 commits)")[![gaugejosh](https://avatars.githubusercontent.com/u/2511295?v=4)](https://github.com/gaugejosh "gaugejosh (1 commits)")[![sgtlambda](https://avatars.githubusercontent.com/u/5894809?v=4)](https://github.com/sgtlambda "sgtlambda (1 commits)")[![brooksgarrett](https://avatars.githubusercontent.com/u/158907?v=4)](https://github.com/brooksgarrett "brooksgarrett (1 commits)")[![theodorejb](https://avatars.githubusercontent.com/u/3053271?v=4)](https://github.com/theodorejb "theodorejb (1 commits)")[![tomafc330](https://avatars.githubusercontent.com/u/819117?v=4)](https://github.com/tomafc330 "tomafc330 (1 commits)")[![topless](https://avatars.githubusercontent.com/u/230805?v=4)](https://github.com/topless "topless (1 commits)")

### Embed Badge

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

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

###  Alternatives

[edvinaskrucas/settings

Persistent settings package for Laravel framework.

22483.1k1](/packages/edvinaskrucas-settings)[adduc/phpmodbus

Composer version of PhpModBus

7713.4k](/packages/adduc-phpmodbus)[craftcms/simple-text

This plugin adds a new “Simple Text” field type to Craft, which provides a textarea that’s optimized for entering documentation.

2624.1k](/packages/craftcms-simple-text)[tatter/menus

Dynamic menus for CodeIgniter 4

1713.8k1](/packages/tatter-menus)[asorasoft/chhankitek

Convert from AD (Anno Domini) to Lunar (Chhankitek) format.

104.2k](/packages/asorasoft-chhankitek)

PHPackages © 2026

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