# Kotlin/kotlinx.html

Kotlin DSL for HTML

Repository: https://github.com/Kotlin/kotlinx.html
Canonical: https://ross.abutalabs.com/products/kotlinxhtml
Language: Kotlin
License: Apache-2.0
License Family: permissive
Topics: kotlin, dsl, html
Last push: 2026-08-11T16:16:17+00:00

## Health v2 (maintenance only)
Score: 66/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 97, release rhythm 8, longevity 100
- inputs: {"age_days": 4171, "days_push": 22, "days_rel": 595, "gap_med": null, "n_releases_24m": 1}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1747, forks 134 (observed 2026-08-28T04:05:30.834244+00:00)

## What it is
kotlinx.html is an official JetBrains Kotlin library providing a type-safe DSL for building HTML, either streaming to a Writer/Appendable or constructing DOM trees. It supports all Kotlin Multiplatform targets including JVM, JS, and WasmJS.

## Use cases
- generate html from kotlin code
- build dom trees in kotlin for the browser
- render server-side html templates in kotlin
- write type-safe html without string concatenation
- create html for kotlin/wasm web apps
- stream html output to a writer in a ktor server

## When to choose
- you write Kotlin and want compile-time-safe HTML generation
- you need HTML rendering across JVM, JS, and WasmJS targets
- you prefer building DOM programmatically over hand-written HTML templates

## When to avoid
- your stack is not Kotlin or JVM-based
- you need designer-friendly template files rather than code-based markup
- you need a full frontend framework with state management

## Facets
- artifact type: library
- maturity: stable
- function: templating, frontend-framework
- domain: web-development, frontend
- platform: jvm, browser, wasm, cross-platform
- tags: kotlin, html-dsl, kotlin-multiplatform, dom, type-safe-html, nodejs

## Member repositories
- Kotlin/kotlinx.html (main) score 66

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:30.834244+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T03:29:01.736974+00:00, confidence not recorded.
  - readme: https://github.com/Kotlin/kotlinx.html (fetched 2026-08-28T04:05:30.834244+00:00, sha b73a0405f58b)
- Data as of 2026-08-30T08:39:29.467469+00:00.
