Library Spotlight

Spotlight: SweetAlert2 for Notifications

Create beautiful alerts and dialogs with SweetAlert2.

M. WarbleAugust 27, 20261 min read
Spotlight: SweetAlert2 for Notifications

SweetAlert2 provides beautiful, responsive, customizable popup boxes. Oorian's wrapper makes it easy to show alerts, confirmations, and toasts.

Basic Alerts

SwalAlert.success("Success!", "Your changes have been saved.");
SwalAlert.error("Error", "Something went wrong.");
SwalAlert.warning("Warning", "Are you sure you want to proceed?");

Confirmation Dialogs

SwalAlert.confirm("Delete?", "This action cannot be undone.")
    .onConfirm(() -> {
        deleteItem();
        refreshList();
    })
    .onCancel(() -> {
        // User cancelled
    })
    .show();

Toast Notifications

SwalToast.success("Item saved")
    .setPosition(Position.TOP_END)
    .setTimer(3000)
    .show();

Conclusion

SweetAlert2 replaces browser alerts with beautiful, customizable popups that enhance user experience.

Related Articles

Security

Security by Default: How Oorian Protects Your Applications

January 11, 2026
Announcement

Why We Built Oorian: The Story Behind the Framework

January 7, 2026
Tutorial

Getting Started with Oorian: Your First Java Web Application

December 31, 2025