Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cfware/shadow-element
My uhtml based shadow element
https://github.com/cfware/shadow-element
Last synced: 29 days ago
JSON representation
My uhtml based shadow element
- Host: GitHub
- URL: https://github.com/cfware/shadow-element
- Owner: cfware
- License: mit
- Created: 2018-11-22T18:59:10.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2023-10-17T03:44:32.000Z (about 1 year ago)
- Last Synced: 2024-10-31T19:56:10.258Z (about 2 months ago)
- Language: JavaScript
- Homepage:
- Size: 153 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# @cfware/shadow-element [![NPM Version][npm-image]][npm-url]
My uhtml based shadow element
## Usage
This module makes use of public class fields.
```js
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');
```[npm-image]: https://img.shields.io/npm/v/@cfware/shadow-element.svg
[npm-url]: https://npmjs.org/package/@cfware/shadow-element