a post-component library for building user-interfaces on the web.
TypeScript 84.7%
JavaScript 10.5%
HTML 3.4%
CSS 1.4%
Other 0.1%
293 14 0

Clone this repository

https://tangled.org/tombl.dev/dhtml https://tangled.org/did:plc:3dk7at6chlxrvmiduw4cf7cp/dhtml
git@k.tombl.net:tombl.dev/dhtml git@k.tombl.net:did:plc:3dk7at6chlxrvmiduw4cf7cp/dhtml

For self-hosted knots, clone URLs may differ based on your setup.

Download tar.gz
readme.md

dhtml#

a post-component library for building user interfaces on the web.

import { html } from 'https://tombl.github.io/dhtml/dist/index.js'
import { createRoot, invalidate } from 'https://tombl.github.io/dhtml/dist/client.js'

const app = {
	i: 0,
	render() {
		return html`
			<button
				onclick=${() => {
					this.i++
					invalidate(this)
				}}
			>
				Count: ${this.i}
			</button>
		`
	},
}

createRoot(document.body).render(app)