2.0.1-alpha.0 • Published 7 years ago

@biotope/element v2.0.1-alpha.0

Weekly downloads
174
License
MIT
Repository
github
Last release
7 years ago

Biotope Element

Installation

You can install the biotope element in your project using npm

npm install @biotope/element --save

or yarn

yarn add @biotope/element --save
import Element from '@biotope/element';

Usage

To use the biotope element, you have to extend it with your custom class:

import Element from '@biotope/element';

export class MyButton extends Element {
  public static componentName = 'my-button';
  
  public render() {
    return this.html`Hello World`;
  }
}

After defining your class which you can do using existing methods (link) you have to call register on the class itself to use it in the html: index.js

import Element from '@biotope/element';

export class MyButton extends Element {
  public static componentName = 'my-button';
  
  public render() {
    return this.html`Hello World 🐤`;
  }
}

MyButton.register();

After that you can use it in your html like that: index.html

<script src="index.js"></script>  
<my-button></my-button>

This will result inthe following html:

<my-button>
  Hello world 🐤
</my-button>
4.3.0

6 years ago

4.2.0

6 years ago

4.1.0

6 years ago

4.1.1

6 years ago

4.0.0

6 years ago

4.0.0-6

6 years ago

4.0.0-5

6 years ago

4.0.0-4

6 years ago

4.0.0-3

6 years ago

4.0.0-2

6 years ago

4.0.0-1

6 years ago

4.0.0-0

6 years ago

3.2.0

6 years ago

3.2.0-0

7 years ago

3.1.0-0

7 years ago

3.0.2

7 years ago

3.0.1

7 years ago

3.0.0

7 years ago

2.2.0

7 years ago

2.1.0

7 years ago

2.0.2

7 years ago

2.0.1-alpha.0

7 years ago

2.0.1

7 years ago

2.0.0

7 years ago

1.8.3

7 years ago

1.8.2

7 years ago

1.8.1

7 years ago

1.8.0

7 years ago

1.7.0

7 years ago

1.6.0

7 years ago

1.5.1

7 years ago

1.5.0

7 years ago

1.3.0

7 years ago

1.2.2

7 years ago

1.2.1

7 years ago

1.2.0

7 years ago

1.1.0

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago