Custom Class
In SweetAlert2, customClass
is a property that allows you to assign custom CSS classes to various elements of the popup.
This is particularly useful for customizing the appearance of a SweetAlert2 popup without directly modifying the default styles or themes.
.my-popup-class {
background-color: #f0f0f0;
border: 2px solid #333;
}
.my-title-class {
color: #ff0000;
font-size: 24px;
}
.my-confirm-button-class {
background-color: #4caf50;
color: white;
}
customClass: {
container: '...',
popup: '...',
header: '...',
title: '...',
closeButton: '...',
icon: '...',
image: '...',
htmlContainer: '...',
input: '...',
inputLabel: '...',
validationMessage: '...',
actions: '...',
confirmButton: '...',
denyButton: '...',
cancelButton: '...',
loader: '...',
footer: '....',
timerProgressBar: '....',
}