Published
Edited
Aug 17, 2018
1 fork
3 stars
Insert cell
Insert cell
MyElement = import('@polymer/lit-element').then(lit => {
class MyElement extends lit.LitElement {
static get properties() { return { mood: String }}

_render({mood}) {
return lit.html`<style> .mood { color: green; } </style>
Web Components are <span class="mood">${mood}</span>!`;
}
}
if(!window.customElements.get('my-element')) {
window.customElements.define('my-element', MyElement)
}
return MyElement
})
Insert cell
html`<my-element mood="happy"></my-element>`
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more