Kotlin/kotlinx.html
Kotlin/kotlinx.html has 1,755 GitHub stars and 134 forks. GitHot measured +1 stars in 24 hours. Last checked 2026-11-06 04:58 UTC. Last push 2026-08-11.
Kotlin DSL for HTML
Measured star growth
- in 24h
- +1
- in 7 days
- Update delayed
- in 15 days
- Update delayed
- in 1 month
- Update delayed
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
README.md
Originalkotlinx.html
The kotlinx.html library provides a DSL to build HTML to Writer/Appendable or DOM. Available to all Kotlin Multiplatform targets and browsers (or other WasmJS or JavaScript engines) for better Kotlin programming for Web.
Get started
See Getting started page for details how to include the library.
DOM
You can build a DOM tree with JVM, JS, and WASM. The following example shows how to build the DOM for WasmJs-targeted Kotlin:
import kotlinx.browser.document
import kotlinx.browser.window
import kotlinx.html.a
import kotlinx.html.div
import kotlinx.html.dom.append
import kotlinx.html.dom.create
import kotlinx.html.p
fun main() {
val body = document.body ?: error("No body")
body.append {
div {
p {
+"Here is "
a("https://kotlinlang.org") { +"official Kotlin site" }
}
}
}
val timeP = document.create.p {
+"Time: 0"
}
body.append(timeP)
var time = 0
window.setInterval({
time++
timeP.textContent = "Time: $time"
return@setInterval null
}, 1000)
}
Stream
You can build HTML directly to Writer (JVM) or Appendable (Multiplatform)
System.out.appendHTML().html {
body {
div {
a("https://kotlinlang.org") {
target = ATarget.blank
+"Main site"
}
}
}
}
Documentation
See wiki pages
Building
See the development page for details.
Explore related projects
codecrafters-io/build-your-own-x
Master programming by recreating your favorite technologies from scratch.
560,452 starspublic-apis/public-apis
A collective list of free APIs
496,767 starsmorluto/rea
Reverse engineer anything with agents, from app behavior down to native binaries.
438,168 starsopenclaw/openclaw
The AI that really does things. Any OS. Any Platform. The lobster way. 🦞
394,078 stars