Snackbar.js

Explore how the Snackbar.js library can be used to display notifications in different positions and with various styles. The demo below showcases different configurations.

Basic Snackbar - All Positions

Snackbar Inside an Element

This is an example container. The snackbar will appear inside this container.

Dismissible Snackbars

Custom Duration and Style

Status-Based Snackbars

Documentation

The Snackbar.js library allows you to show notifications (snackbars) on your web page with ease. Below is a brief documentation of the available options:

To use the library, call the showSnackbar function with the desired options:

showSnackbar({
    message: 'Your message here!',
    position: 'top-center',
    duration: 3000,
    customClass: 'your-custom-class',
    dismissible: true,
    closeIcon: '<i class="your-custom-icon"></i>'
});