Getting Started

Bootstrap Elements Leverages Bootstrap's CSS and JS to provide a native bootstrap experience.

Installation

You can install bootstrap elements via npm

npm i bootstrap-elements

JS

Bootstrap Elements is a single js file which bundles Bootstrap js, css and Bootstrap Elements code

You might be wondering why the css is bundled? This is so that the css can be available within the shadow DOM. The CSS is converted to JS and then a style tag is adopted by the custom elements.

You can provide your own css. Please see the guide below.

                                
<script src="jquery.min.js"></script>
<script src="bootstrap-elements.js"></script>
                                
                            

Bootstrap elements is bundled with Bootstrap bundle which includes popper.js

JQuery is required as Bootstrap requires it.

Custom Bootstrap CSS

If you want to provide your own css you can pass it via a variable on the window.

                                
<script>
    window.CustomBootstrapCSS = "body { background-color:red }";
</script>
<script src="jquery.min.js"></script>
<script src="bootstrap-elements-lite.js"></script>