@cfware/shadow-element

1.1.0 • Public • Published

@cfware/shadow-element NPM Version

My uhtml based shadow element

Usage

This module makes use of public class fields.

import ShadowElement, {html, template, css, adoptedStyleSheets, define} from '@cfware/shadow-element';

class MyElement extends ShadowElement {
	static [adoptedStyleSheets] = [
		css`
			:host {
				background: blue;
			}
		`
	];

	get [template]() {
		return html`I'm blue`;
	}
}

MyElement[define]('my-element');

Readme

Keywords

none

Package Sidebar

Install

npm i @cfware/shadow-element

Weekly Downloads

65

Version

1.1.0

License

MIT

Unpacked Size

21.6 kB

Total Files

5

Last publish

Collaborators

  • coreyfarrell