Latest version : 4.3.0

 Last updated on 2019-02-11T02:54:04.799Z

 Keywords : abstract, web, component

 Downloads :

  • 84 in Last Month

 Links :


No examples found for this package



AbstractElement aims for creating web components identically independent from a render function.

With AbstractElement you can use lit-html or hyperHTML inside components with same manner.

AbstractElement can uses hyperHTML or lit-html or even your custom render function to render component into the DOM element's. AbstractElement reacts to changes in attributes or states and renders declaratively using the render function.

Getting started

  1. Add abstract-element to your project:

    npm i abstract-element

  2. Create an element by extending AbstractElement and calling customElements.define with your class or use @Define directive if you use TypeScript.

  3. Install the hyperHTML or lit-html or other render.

  4. Import AbstractElement and an render function. By default AbstractElement and the render function imports as esm2015 module, but you can import theyr from es5 folder for use as cjs module with ECMAScript 5.

  5. See the demo files.

🛠 Documentation status: IN PROCESS

This documentation is currently in development. It will be finish soon.