calerts
TypeScript icon, indicating that this package has built-in type declarations

1.1.10 • Public • Published

Custom-Alert

Custom-alert is a lightweight alternative for sweetalert.

This library doest not support IE

This library inspire by sweetalert

Checkout the Documentation

Installation

NPM

npm i calerts

Unpkg (9kb)

<script src="https://unpkg.com/calerts"></script>

Unpkg Unbabel Version (8kb)

<script src="https://unpkg.com/calerts@latest/dist/calert.unbabel.min.js"></script>

Usage

calert('Error', 'Something error occured', 'error')

sample

sample 2

calert({
  icon: 'question',
  title: 'Do you have any questions ?',
  confirmButton: 'Yes',
  cancelButton: 'Nothing',
}))

sample

sample 3

calert({
  icon: "warning",
  text: "You must login first",
  inputs: {
    username: {
      type: "text",
      placeholder: "Username"
    },
    password: {
      type: "password",
      placeholder: "Password",
    }
  }
  confirmButton: "Login"
})

sample

Package Sidebar

Install

npm i calerts

Weekly Downloads

149

Version

1.1.10

License

MIT

Unpacked Size

36.9 kB

Total Files

6

Last publish

Collaborators

  • darkcris1