@musakui/ui
v0.0.1
Published
web ui
Readme
ui
web ui
Features
htmltagged template literal (similar tolit-htmlanduhtml)signalandcomputed(powered byalien-signals)- No vDOM, direct content/attribute/property/event bindings
Usage
Basic HTML and reactive rendering
import { html, signal, computed } from '@musakui/ui'
function Counter() {
const count = signal(0)
const double = computed(() => count.value * 2)
const frag = html`<div>
<p>Count: ${count}</p>
<p>Double: ${double}</p>
<button @click=${() => count.value++}>Increment</button>
</div>`
// nothing is created until `.init()` is called
return frag.init()
}
document.body.append(Counter())