A bare minimum custom element starter-kit using VanillaJS.
Like Yeoman? Use the generator-element instead.
Looking for a working example? Check hello-world-element.
Install the component using Bower:
$ bower install my-repo --save
Or download as ZIP.
Import polyfill:
<script src="https://github.com/webcomponents/element-boilerplate/raw/master/bower_components/webcomponentsjs/webcomponents.min.js"></script>
Import custom element:
<link rel="import" href="https://github.com/webcomponents/element-boilerplate/blob/master/bower_components/my-repo/my-element.html">
Start using it!
<my-element></my-element>
Attribute | Options | Default | Description |
---|---|---|---|
foo |
string | bar |
Lorem ipsum dolor. |
Method | Parameters | Returns | Description |
---|---|---|---|
unicorn() |
None. | Nothing. | Magic stuff appears. |
Event | Description |
---|---|
onsomething |
Triggers when something happens. |
In order to run it locally you'll need to fetch some dependencies and a basic server setup.
$ npm install -g bower polyserve
Install local dependencies:
$ bower install
Start development server and open http://localhost:8080/components/my-repo/
.
$ polyserve
For detailed changelog, check Releases.