PHPackages                             awesometoast/toastbox - 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. awesometoast/toastbox

ActiveLibrary

awesometoast/toastbox
=====================

Wrappers for JavaScript alert(), confirm(), prompt(), and other flexible dialogs using the Bootstrap 5 framework that does not require jQuery. This is a fork of Bootboxjs by Nick Payne.

v1.0(10mo ago)0405↓100%MITJavaScript

Since Jun 24Pushed 10mo agoCompare

[ Source](https://github.com/awesometoast/toastbox)[ Packagist](https://packagist.org/packages/awesometoast/toastbox)[ RSS](/packages/awesometoast-toastbox/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

Toastbox - Bootstrap-powered alert, confirm and flexible dialog boxes
=====================================================================

[](#toastbox---bootstrap-powered-alert-confirm-and-flexible-dialog-boxes)

This is a fork of [Bootbox](https://github.com/bootboxjs/bootbox) by Nick Payne, specifically designed for Bootstrap 5.3+ while also removing the jQuery dependency.

Why This Fork Exists
--------------------

[](#why-this-fork-exists)

This fork was created to:

- Focus specifically on Bootstrap 5.3+ compatibility
- Remove the jQuery dependency for Bootstrap 5 sites that don't rely on it

We gratefully acknowledge the excellent foundation provided by Nick Payne's original Bootbox project. He should get a raise of some kind. Or at least a free donut (or other pastry of his choice). Or both. Why not both?

Prerequisites
-------------

[](#prerequisites)

Toastbox requires Bootstrap 5.3 or higher. This package does not include Bootstrap -- you'll need to include that separately in your project.

Examples
--------

[](#examples)

Open `examples/index.html` in your web browser. It's got:

- **Interactive Demos**: Click buttons to see all features in action. So interactive!
- **Complete Code Examples**: Copy-paste ready code for every dialog type. Easy.
- **An all-seeing orb**: It doesn't have that.

The examples use Bootstrap 5.3.7 from CDN and include `toastbox.css` for optimal styling. All examples demonstrate real-world usage patterns and are self-contained for easy testing.

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

[](#installation)

### CDN

[](#cdn)

```

```

### NPM

[](#npm)

```
npm install toastbox
```

### Composer

[](#composer)

```
composer require awesometoast/toastbox
```

### Symfony 7 with AssetMapper

[](#symfony-7-with-assetmapper)

1. Install the package:

```
composer require awesometoast/toastbox
```

2. The package automatically registers with AssetMapper. You can import it in your JavaScript:

```
import toastbox from '@awesometoast/toastbox';

// Or import with locales
import toastbox from '@awesometoast/toastbox/all';

// Or import locales separately
import toastbox from '@awesometoast/toastbox';
import '@awesometoast/toastbox/locales';
```

3. Use in your Twig templates:

```
{% block javascripts %}
    {{ parent() }}

        import toastbox from '@awesometoast/toastbox';

        // Your toastbox code here
        toastbox.alert("Hello from Symfony!");

{% endblock %}
```

### Laravel / Static HTML

[](#laravel--static-html)

For non-Symfony projects, you can use the dist files directly:

1. If using Composer:

```
composer require awesometoast/toastbox
```

2. Include the JavaScript file:

```

```

Running Tests
-------------

[](#running-tests)

Tests are run using [Karma](http://karma-runner.github.io/0.8/index.html) using the Mocha test adapter. To run the tests yourself, simply run:

```
npm install

```

within the project followed by:

```
npm test

```

Tests are run against the generated files contained in the `/dist` directory - regenerate those files and run the Karma tests by simply running Grunt:

```
grunt

```

License
-------

[](#license)

(The MIT License)

Copyright (C) 2011-2022 by Nick Payne  (original Bootbox)

Copyright (C) 2025 by Awesometoast (Toastbox fork modifications)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance54

Moderate activity, may be stable

Popularity16

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity36

Early-stage or recently created project

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

321d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/01d65d7b4e71ce3b25e4571473029d91453c4df78be4b2fe040936d2b753a553?d=identicon)[awesometoast](/maintainers/awesometoast)

---

Tags

javascriptuibootstrapmodalalertconfirmpromptdialog

### Embed Badge

![Health badge](/badges/awesometoast-toastbox/health.svg)

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

###  Alternatives

[jschr/bootstrap-modal

Extends the default Bootstrap Modal class. Responsive, stackable, ajax and more.

5.0k39.5k1](/packages/jschr-bootstrap-modal)[snapappointments/bootstrap-select

The jQuery plugin that brings select elements into the 21st century with intuitive multiselection, searching, and much more. Now with Bootstrap 4 support.

9.8k480.4k3](/packages/snapappointments-bootstrap-select)[kartik-v/yii2-dialog

An asset bundle for bootstrap3-dialog for Yii 2.0 framework.

496.2M18](/packages/kartik-v-yii2-dialog)[desandro/imagesloaded

JavaScript is all like \_You images done yet or what?\_

8.9k439.0k1](/packages/desandro-imagesloaded)[nostalgiaz/bootstrap-switch

Turn checkboxes and radio buttons into toggle switches.

5.0k362.3k4](/packages/nostalgiaz-bootstrap-switch)[nette/forms

📝 Nette Forms: generating, validating and processing secure forms in PHP. Handy API, fully customizable, server &amp; client side validation and mature design.

54013.2M450](/packages/nette-forms)

PHPackages © 2026

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