5.1.1 • Published 1 month ago

lithen-super-element v5.1.1

Weekly downloads
-
License
MIT
Repository
github
Last release
1 month ago

Lithen - Super Element

Lithen is a set of simple tools, that anyone could have built, to use with Web Components. They can be used alone, so it's provided separately.

Super Element is a class used to create Web Components, it provides some features to make Web Components usage a bit simple. But it not focus on change the aproach of using the Web Components, like implementing reactivity and the like, its a bit like a syntax sugar.

This package uses ESModules.

Usage

import { SuperElement } from 'lithen-super-element'

class AppElement extends SuperElement {
  constructor() {
    super()

    this.applyRender()
    this.init()
  }

  init() {
    this.select('p').className = 'text'
  }
  
  styling() {
    return `
      .text {
        color: #d45;
      }
    `
  }

  render() {
    return '<p>Element using Lithen</p>'
  }
}

customElements.define('app-element', AppElement)

SuperElement methods and attributes

Other libs that are part of Lithen

5.1.1

1 month ago

5.1.0

1 month ago

5.0.1

9 months ago

5.0.0

2 years ago

4.1.0

2 years ago

4.0.1

2 years ago

4.0.0

2 years ago

4.1.1

2 years ago

3.2.0

2 years ago

3.1.1

2 years ago

3.0.2

2 years ago

3.1.0

2 years ago

3.0.1

2 years ago

3.0.0

2 years ago

2.0.2

2 years ago

2.0.1

3 years ago

1.1.5

3 years ago

1.1.4

3 years ago

1.1.3

3 years ago

1.1.2

3 years ago

2.0.0

3 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago