Calert Documentation
calert stands for custom-alert and it's a lighweight alternative for sweetalert and native dialogs with less than 9kb size
Alert Comparison
alert('hello world')
calert("Hello world", "this is a sample")
Installation
NPM
npm i calerts
Unpkg
<script src="https://unpkg.com/calerts@latest"></script>
Unpkg Unbabel version (8kb)
<script src="https://unpkg.com/calerts@latest/dist/calert.unbabel.min.js"></script>
Usage
import calert from 'calert'
calert('Error', 'Something error occured', 'error')
Equivalent to:
calert({
title: 'Error',
text: 'Something error occured',
icon: 'error',
})