bstoast

A lightweight Bootstrap 5 toast notification library that provides a modern alternative to `alert()`.

Quick Start

import { bstoast } from "https://cdn.jsdelivr.net/npm/bstoast";

// Simple usage
bstoast("Hello World!");

Live Examples

Try out bstoast with these interactive examples:

Example Code

// Simple toast
bstoast("Simple message");

// Custom toast with title and color
bstoast({
    title: "Success",
    body: "Custom toast message",
    color: "success",
    timeout: 3000
});

// Toast that replaces previous ones
bstoast({
    title: "Warning",
    body: "This replaces previous toast",
    color: "warning",
    append: false
});

// Toast with an icon
bstoast({
    title: "Info",
    body: "This toast has an icon",
    color: "info",
    icon: "info-circle"
});

// Toast at bottom start position
bstoast({
    title: "Position",
    body: "This toast appears at the bottom start",
    color: "warning",
    position: "bottom-0 start-0"
});

Documentation

For full documentation, visit our GitHub repository.