cm-bootstrap-modaldeprecated

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

Usage no npm install needed!

<script type="module">
  import cmBootstrapModal from 'https://cdn.skypack.dev/cm-bootstrap-modal';
</script>

README

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
};