Getting Started
Paste following code into your head html code:
notifire.notification("GO")
Create a Notification
notifire.notification("GO")
Create an Alert
Success Message
notifire.success("GO")
Error Message
notifire.error("GO")
Alert Message
notifire.alert("GO")
Notification Message
notifire.notification("GO")
Code Example
Make an API call, and depending on the result a error or success alert appears.
fetch('https://api.example.com/data')
.then(response => response.json())
.then(data => {
if (data.success) {
notifire.success('API call successful');
} else {
notifire.error('API call failed');
}
})
.catch(error => {
notifire.error('An error occurred during the API call');
});