Library Spotlight

Spotlight: SweetAlert2 for Notifications

Create beautiful alerts and dialogs with SweetAlert2.

M. WarbleJune 30, 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.

Share this article

Related Articles

Library Spotlight

Spotlight: Chart.js for Beautiful Data Visualization

January 27, 2026
Deep Dive

Logging and Error Handling in Oorian: A Complete Guide

February 24, 2026
Architecture

Event Handling in Oorian

February 19, 2026