Sixphere Lit Element
!Versionversion-badgeversion-url
!Node versionnode-version-badgenode-version-url
!MIT Licensemit-license-badgemit-license-url!Downloadsdownloads-badgedownloads-url !Total downloadstotal-downloads-badgedownloads-url
!Packagephobiapackagephobia-badgepackagephobia-url !Bundlephobiabundlephobia-badgebundlephobia-url
Libraries
!lit-elementlit-element-version-badgelit-element-urlSixphere Lit Element is a subclass of LitElementlit-element-url with new features:
- Binding child nodes by reference: You can bind a child node as a property by defining his
ref
attribute.
Install
npm install '@sixphere/lit-element' --save
How to use?
Use like a super class
import {SixphereLitElement} from '@sixphere/lit-element'
class MyElement extends SixphereLitElement {
render() {
return html `
<div ref="test">
<p>hello world!</p>
</div>
`
}
}
customElements.define("my-element", MyElement)