PHPackages                             webcito/bs-toast - 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. webcito/bs-toast

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

webcito/bs-toast
================

description

1.0.3(11mo ago)136proprietaryHTML

Since Jun 17Pushed 11mo ago1 watchersCompare

[ Source](https://github.com/ThomasDev-de/bs-toast)[ Packagist](https://packagist.org/packages/webcito/bs-toast)[ RSS](/packages/webcito-bs-toast/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (4)Dependencies (4)Versions (5)Used By (0)

README: bs-toast.js
===================

[](#readme-bs-toastjs)

1. Installation
---------------

[](#1-installation)

You can include `bs-toast.js` in your project using Composer or by manually downloading the script file.

### Composer

[](#composer)

Use the following command to install via composer:

```
composer require bs-toast:dev-main
```

### Manual Installation

[](#manual-installation)

To manually install the script, download `bs-toast.js` and include it in your project's JavaScript files.

2. Options
----------

[](#2-options)

`bsToast` file has a number of options you can customize. The options for the toast feature include:

- `type`: The type of the toast. It could be one of 'info', 'warning', 'success', 'danger'. The default value is 'info'.
- `title`: The title of the toast. By default, it's null.
- `message`: The message of the toast. The default message is 'Always be informed'.
- `start`: The starting time of the toast, it is 0 by default.
- `delay`: Delay before the toast disappears, 5000ms as default.
- `autoHide`: A boolean indicating whether to hide the toast automatically. It's by default set to true.
- `animation`: A boolean indicating whether the toast should be animated or not, also set to true by default.
- `placement`: The placement of the toast. The possible values are 'ts', 'tc', 'te', 'ms', 'mc', 'me', 'bs', 'bc', 'be'. By default, it's 'mc'.

3. Events
---------

[](#3-events)

The script triggers various events that allow your application to react to the different states of the toast lifecycle:

- `onShow`: This event is fired when the toast starts showing.
- `onShown`: Firing after the toast has been shown.
- `onHide`: This event is fired when the toast starts hiding.
- `onHidden`: Firing after the toast has been hidden.
-

### 4. Methods

[](#4-methods)

```
const myToast = $.bsToast({
    ...
}); // The plugin returns the toast

myToast.isExists() // bool
// The bootstrap methods
myToast.hide()
myToast.isShown() // bool

const allToast = $.bsToast.getToasts();
// Close all opened toasts
$.bsToast.closeAll();
```

5. Example
----------

[](#5-example)

Here is an example of how to use the `bsToast`.:

```
$(document).ready(function() {
    const myToast = $.bsToast({
        type: 'info',
        title: 'Hello, User',
        message: 'This toast is a toast example.',
        autoHide: false,
        placement: 'tc',
        onShow: function() {
            // Write your code here for the onShow event.
        },
        onShown: function() {
            // Write your code here for the onShown event.
        },
        onHide: function() {
            // Write your code here for the onHide event.
        },
        onHidden: function() {
            // Write your code here for the onHidden event.
        },
    });
});
```

5. Further Information
----------------------

[](#5-further-information)

For further information or to address additional queries, please feel free to open an issue in the repository or contact the maintainers.

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance52

Moderate activity, may be stable

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 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 ~120 days

Total

4

Last Release

339d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/6d5f10c16b4b6bd1ac531ffc39c23c569490ec4630829511692c03ec89d36a11?d=identicon)[thomasK81](/maintainers/thomasK81)

---

Top Contributors

[![ThomasDev-de](https://avatars.githubusercontent.com/u/67106837?v=4)](https://github.com/ThomasDev-de "ThomasDev-de (13 commits)")

---

Tags

bootstrap5javascriptjquerynotificationplugin

### Embed Badge

![Health badge](/badges/webcito-bs-toast/health.svg)

```
[![Health](https://phpackages.com/badges/webcito-bs-toast/health.svg)](https://phpackages.com/packages/webcito-bs-toast)
```

###  Alternatives

[serhioromano/bootstrap-calendar

Bootstrap full view calendar.

3.0k5.9k2](/packages/serhioromano-bootstrap-calendar)[mapbender/mapbender

Mapbender library

10117.4k5](/packages/mapbender-mapbender)

PHPackages © 2026

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