๐ toastalert v2.0.0 Released — Lightweight, Flexible JS Toast Notification Library
๐ Introduction
We’re excited to announce the release of toastalert v2.0.0, a significant upgrade to our lightweight JavaScript toast notification library. Whether you're building a dashboard, CMS, admin panel, or a blog — this plugin helps deliver beautiful, non-intrusive messages to your users in seconds.
Built with vanilla JavaScript and jQuery compatibility, it's perfect for modern web projects.
โจ What’s New in v2.0.0
| Feature | Description |
|---|---|
| โ Fade Animation | Smooth in-out transitions for toasts. |
| โ Icon Support | Auto-injects status icons (โ โ โ ๏ธ โน๏ธ) based on type. |
| โ Positioning Support | Easily place your toast: top-left, top-right, bottom-left, or bottom-right. |
| โ CDN + jQuery Plugin | Works standalone or as a chainable jQuery plugin. |
| โ Reload or Redirect | Add reload: true or url: 'page.html' for post-toast actions. |
๐ง Installation
๐ฆ CDN (No jQuery Required)
๐งฉ CDN with jQuery Plugin Support
๐งช Usage Examples
โ Vanilla JS
toastalert.showToast({
message: "Operation successful!",
status: "success",
position: "top-right",
reload: false,
url: "https://example.com",
});
https://softondemand.co.in/api/toast/toastalert.v2.0.0.js
โ jQuery Plugin
$('body').toastAlert({
message: "Something went wrong.",
status: "error",
url: "/login"
});
๐งฉ Status Types & Icons
status |
Icon | Color |
|---|---|---|
success |
โ | Green |
error |
โ | Tomato |
warning |
โ ๏ธ | Yellow |
info |
โน๏ธ | Gray |
๐ Positioning
Use the position option to set where the toast appears:
-
top-left -
top-right -
bottom-left -
bottom-right(default)
๐ Auto Actions
toastalert.showToast({
message: "Redirecting...",
status: "info",
url: "/dashboard" // or use `reload: true`
});
๐ Changelog
๐ v2.0.0
-
Added fade animation
-
Icon support for toast types
-
Custom positioning
-
jQuery plugin integration
-
Improved accessibility
-
Graceful DOM cleanup
๐ Coming in Future Versions
-
Manual close button (
X) -
Toast queue & stacking
-
Dark mode theming
-
Custom icon/image injection
-
Toast duration config per type
๐ Why Use toastalert?
-
Lightweight and dependency-free
-
Easy to integrate with any existing UI
-
Works with or without jQuery
-
Clean UI without bloated libraries
-
Fully open-source and extendable
๐ง๐ป Contribution & Feedback
We welcome issues, feature requests, and pull requests. Help us improve toastalert for the community!