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.4(2mo ago)263proprietaryHTML

Since Jun 17Pushed 1mo 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 today

READMEChangelog (5)Dependencies (8)Versions (6)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 'top-start' or 'ts', 'top-center' or 'tc', 'top-end' or 'te', 'middle-start' or 'ms', 'middle-center' or 'mc', 'middle-end' or 'me', 'bottom-start' or 'bs', 'bottom-center' or 'bc', 'bottom-end' or 'be'. By default, it's 'bottom-end'.

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

41

—

FairBetter than 87% of packages

Maintenance90

Actively maintained with recent releases

Popularity14

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity45

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

Total

5

Last Release

68d 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 (15 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

[jason-munro/cypht

Lightweight Open Source webmail written in PHP and JavaScript

1.6k157.9k](/packages/jason-munro-cypht)[mapbender/mapbender

Mapbender library

10418.3k8](/packages/mapbender-mapbender)[datatables.net/datatables.net

DataTables is a plug-in for the jQuery Javascript library. It is a highly flexible tool, based upon the foundations of progressive enhancement, which will add advanced interaction controls to any HTML table. This is jQuery DataTables

58170.0k33](/packages/datatablesnet-datatablesnet)[datatables.net/datatables.net-bs5

DataTables is a plug-in for the jQuery Javascript library. It is a highly flexible tool, based upon the foundations of progressive enhancement, which will add advanced interaction controls to any HTML table. This is DataTables with styling for \[Bootstrap5\](https://getbootstrap.com/)

2193.4k18](/packages/datatablesnet-datatablesnet-bs5)[datatables.net/datatables.net-bs4

DataTables is a plug-in for the jQuery Javascript library. It is a highly flexible tool, based upon the foundations of progressive enhancement, which will add advanced interaction controls to any HTML table. This is DataTables with styling for \[Bootstrap4\](https://getbootstrap.com/docs/4.6/getting-started/introduction/)

2925.5k14](/packages/datatablesnet-datatablesnet-bs4)[datatables.net/datatables.net-bs

DataTables is a plug-in for the jQuery Javascript library. It is a highly flexible tool, based upon the foundations of progressive enhancement, which will add advanced interaction controls to any HTML table. This is DataTables with styling for \[Bootstrap\](https://getbootstrap.com/docs/3.3/)

161.6k14](/packages/datatablesnet-datatablesnet-bs)

PHPackages © 2026

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