An open API service indexing awesome lists of open source software.

https://github.com/dhanyn10/bootsalert

Javascript alert creator library for Bootstrap Framework
https://github.com/dhanyn10/bootsalert

alert bootstrap3 bootstrap4 library

Last synced: about 2 months ago
JSON representation

Javascript alert creator library for Bootstrap Framework

Awesome Lists containing this project

README

        

# BootsAlert

Simple library to create alert from Bootstrap Framework.

[![dependencies Status](https://david-dm.org/dhanyn10/bootsalert/status.svg)](https://david-dm.org/dhanyn10/bootsalert)
[![npm version](https://badge.fury.io/js/bootsalert.svg)](https://badge.fury.io/js/bootsalert)

# Compatibility
This library is compatible with bootstrap 3 and 4 alert.

# How to Use
This code below shows you an example about how to use this library:
```html
...

bootsalert({
className: "success",
message: "be success",
container: "demo",
closebtn: true
});

```
There's several variable that must be filled and should be filled to make this library can work perfectly:

| variable | type | condition | default | details |
|----------|------|-----------|---------|---------|
| className | string | required | empty | class name of alert provide by bootstrap. you can use `success` class or other class name or your own custom class |
| message | string | required | empty | your message to user after doing something |
| container | string | required | empty | alert will be inserted to this component. Selected component must have id attributes |
| closebtn | boolean | optional | false | specify that alert will have close button or not. |
| append | boolean | optional | true | bootsalert can be appended with several alert elements in one container |