0.1.1 • Published 5 years ago

bootstrap-elements v0.1.1

Weekly downloads
4
License
ISC
Repository
github
Last release
5 years ago

Install

npm i bootstrap-elements

Include Files

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>

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="bootstrap-elements.js"></script>

Full documentation can be found on the site: https://bootstrap-elements.netlify.com/components.html

Button Example

<be-button type="primary">primary</be-button>
<be-button type="secondary">secondary</be-button>
<be-button type="success">success</be-button>
<be-button type="danger">danger</be-button>
<be-button type="warning">warning</be-button>`

Nav Example

<be-nav>
    <be-navitem>item 1</be-navitem>
    <be-navitem>item 2</be-navitem>
    <be-navitem>item 3</be-navitem>
    <be-navitem disabled="true">item 4</be-navitem>
</be-nav>