This package has been deprecated

Author message:

use bootstrap-show-modal https://www.npmjs.com/package/bootstrap-show-modal instead

cm-bootstrap-modal

1.2.5 • Public • Published

cm-bootstrap-modal

An ES6 module wrapper around Bootstrap 4 modals, to create modals in JavaScript.

Installation

npm install installs bootstrap, popper.js and jQuery, needed for bootstrap modals.

Usage

<script type="module">
    import {BootstrapModal} from "./src/cm-bootstrap-modal/BootstrapModal.js";
 
    new BootstrapModal().show("A Simple Modal", "Hello World!");
</script> 

Examples

Demo Page

Configuration

this.config = {
    dialogCss: "", // Additional css for ".modal-dialog", like "modal-lg" or "modal-sm"
    modalCss: "fade", // Additional css for ".modal"
    options: null // The Bootstrap modal options as described here: https://getbootstrap.com/docs/4.0/components/modal/#options
};

Package Sidebar

Install

npm i cm-bootstrap-modal

Weekly Downloads

1

Version

1.2.5

License

MIT

Unpacked Size

9.41 kB

Total Files

7

Last publish

Collaborators

  • shaack