{"id":15034194,"url":"https://github.com/kotlin/kotlinx.html","last_synced_at":"2025-05-12T13:26:07.018Z","repository":{"id":29757677,"uuid":"33301379","full_name":"Kotlin/kotlinx.html","owner":"Kotlin","description":"Kotlin DSL for HTML","archived":false,"fork":false,"pushed_at":"2025-01-15T12:48:30.000Z","size":1916,"stargazers_count":1674,"open_issues_count":85,"forks_count":134,"subscribers_count":49,"default_branch":"master","last_synced_at":"2025-04-23T07:04:42.594Z","etag":null,"topics":["dsl","html","kotlin"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Kotlin.png","metadata":{"files":{"readme":"README-JS.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-04-02T09:44:50.000Z","updated_at":"2025-04-17T04:04:48.000Z","dependencies_parsed_at":"2023-09-24T06:32:50.381Z","dependency_job_id":"2b5cbf82-50da-4a07-a765-02b4e1d0c3aa","html_url":"https://github.com/Kotlin/kotlinx.html","commit_stats":{"total_commits":695,"total_committers":39,"mean_commits":17.82051282051282,"dds":0.3928057553956834,"last_synced_commit":"abd631c282345769a85383b808b0642bb4a9f39f"},"previous_names":[],"tags_count":100,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kotlin%2Fkotlinx.html","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kotlin%2Fkotlinx.html/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kotlin%2Fkotlinx.html/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kotlin%2Fkotlinx.html/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Kotlin","download_url":"https://codeload.github.com/Kotlin/kotlinx.html/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253746590,"owners_count":21957593,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dsl","html","kotlin"],"created_at":"2024-09-24T20:24:13.543Z","updated_at":"2025-05-12T13:26:06.988Z","avatar_url":"https://github.com/Kotlin.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# kotlinx.html\n\nA kotlinx.html library provides DSL to build HTML to [Writer](https://docs.oracle.com/javase/8/docs/api/java/io/Writer.html)/[Appendable](https://docs.oracle.com/javase/8/docs/api/java/lang/Appendable.html) or DOM at JVM and browser (or other JavaScript engine) for\nbetter [Kotlin programming](https://kotlinlang.org) for Web.\n\n# Get started\n\nSee [Getting started](https://github.com/kotlin/kotlinx.html/wiki/Getting-started) page for details how to include the library.\n\n# DOM\nYou can build DOM tree with JVM and JS naturally\n\nSee example for JavaScript-targeted Kotlin\n\n```kotlin\nwindow.setInterval({\n    val myDiv = document.create.div(\"panel\") {\n        p { \n            +\"Here is \"\n            a(\"https://kotlinlang.org\") { +\"official Kotlin site\" }\n        }\n    }\n\n    document.getElementById(\"container\")!!.appendChild(myDiv)\n\n    document.getElementById(\"container\")!!.append {\n        div {\n            +\"added it\"\n        }\n    }\n}, 1000L)\n```\n\n# Stream\nYou can build HTML directly to Writer (JVM only) or Appendable (both JVM and JS)\n\n```kotlin\nSystem.out.appendHTML().html {\n\tbody {\n\t\tdiv {\n\t\t\ta(\"https://kotlinlang.org\") {\n\t\t\t\ttarget = ATarget.blank\n\t\t\t\t+\"Main site\"\n\t\t\t}\n\t\t}\n\t}\n}\n```\n\n# Documentation\n\nSee [wiki](https://github.com/kotlin/kotlinx.html/wiki) pages\n\n# Building \nSee [development](https://github.com/kotlin/kotlinx.html/wiki/Development) page for details\n\n# Old version\n\nSee https://github.com/kotlinx/kotlinx.html.legacy for older version. We strongly recommend to migrate to latest version.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkotlin%2Fkotlinx.html","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkotlin%2Fkotlinx.html","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkotlin%2Fkotlinx.html/lists"}