3.1.2 • Published 2 months ago
@joist/element v3.1.2
Element
Create a shadow root and apply styles and html as defined
Installation:
npm i @joist/element
Example:
import { tagName, shadow, css, html, attr, listen, element } from '@joist/element';
@element
export class MyElement extends HTMLElement {
// define a custom element
@tagName static tagName = 'my-element';
// apply styles to shadow dom
@shadow styles = css`
:host {
display: block;
color: red;
}
`;
// apply html to shadow dom
@shadow template = html`
<slot></slot>
`;
// define attributes
@attr accessor value = 0;
// listen for events
@listen('click') onClick() {
console.log('clicked!')
}
}
3.1.2
2 months ago
3.1.1
2 months ago
3.1.0
2 months ago
3.0.8-next.0
2 months ago
3.0.8-next.1
2 months ago
3.0.0-next.19
11 months ago
3.0.0-next.18
11 months ago
3.0.4
6 months ago
3.0.7
6 months ago
3.0.6
8 months ago
3.0.0
8 months ago
3.0.0-next.20
11 months ago
3.0.0-rc.2
11 months ago
3.0.0-rc.1
11 months ago
3.0.0-next.11
12 months ago
3.0.0-next.10
12 months ago
3.0.0-next.13
12 months ago
3.0.0-next.12
12 months ago
3.0.0-next.2
12 months ago
0.0.1-canary.1684171969.0
12 months ago
3.0.0-next.1
12 months ago
3.0.1-canary.1684071270.0
12 months ago
3.0.0-next.4
12 months ago
3.0.0-next.3
12 months ago
3.0.0-next.15
12 months ago
3.0.0-next.14
12 months ago
3.0.0-next.16
12 months ago
3.0.0-next.9
12 months ago
0.0.1-canary.1684173474.0
12 months ago
3.0.0-next.6
12 months ago
3.0.0-next.5
12 months ago
3.0.0-next.8
12 months ago
3.0.0-next.7
12 months ago
3.0.1-canary.1684050470.0
12 months ago
3.0.1-canary.1684050018.0
12 months ago
3.0.1-canary.1684050433.0
12 months ago
3.0.1-canary.1684032789.0
12 months ago
0.0.1-canary.1684174867.0
12 months ago
3.0.0-2
12 months ago
3.0.1-canary.1684175944.0
12 months ago
3.0.1-canary.1684050423.0
12 months ago
3.0.1-canary.1684050190.0
12 months ago
2.0.0-canary.1646857025.0
2 years ago
2.0.0-next.1637890492.0
2 years ago
2.0.0-next.1637889305.0
2 years ago
2.0.0-next.2
2 years ago
2.0.0-next.1637886817.0
2 years ago
2.0.0-next.1637881209.0
2 years ago
2.0.0-next.1637851071.0
2 years ago
2.0.0-next.1637850975.0
2 years ago
2.0.0-next.1637850350.0
2 years ago
2.0.0-next.1637850311.0
2 years ago
2.0.0-next.1
2 years ago
2.0.1-next.1637815265.0
2 years ago
2.0.1-next.1637807849.0
2 years ago