0.0.14 • Published 2 years ago

elementalist v0.0.14

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

Usage (browser, no bundler required)

var { Elemental, html } = await import("https://cdn.skypack.dev/@!!!!!/elemental@0.0.13")

// example 1
document.body = html`<body>
    Hello World
</body>`

// example 2
const myAsyncCustomComponent = async ({ style, children, ...props }) => {
    // load a big'ole depenency like d3
    const d3 = await import('https://cdn.skypack.dev/d3')
    return html`<span style=${style}>
        Do you even Async?
        ${JSON.stringify(Object.keys(d3))}
    </span>`
}
document.body = html`<body>
    Hello World
    <br>
    <${myAsyncCustomComponent} />
</body>`


// example 3
html = html.extend({myAsyncCustomComponent})
document.body = html`<body>
    Hello World
    <br>
    <myAsyncCustomComponent />
</body>`

Setup

Everything is detailed in the documentation/setup.md!

0.0.14

2 years ago

0.0.1

6 years ago

1.0.0

6 years ago