@sixphere/lit-element

Vitamined element based on LitElement.

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
@sixphere/lit-element
071.1.15 years ago5 years agoMinified + gzip package size for @sixphere/lit-element in KB

Readme

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-url
Sixphere 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)

License

MIT Licensemit-license-url © 2019 Sixphere