Component Boilerplate

Example

Click a box to trigger eventHandler


Installation

$ npm i -S storm-component-boilerplate

Usage

HTML

JS

Either import and initialise using a named import:

import Boilerplate from 'storm-component-boilerplate';
            
Boilerplate.init('.js-boilerplate');

Or async using storm-load.js, add the .standalone file to your project, then intiialise using the global name:

Load('/content/js/async/storm-component-boilerplate.standalone.js').then(() => {
    StormComponentBoilerplate.init('.js-boilerplate');
});