Kilua is an open source web framework for Kotlin, based on Compose Multiplatform runtime. It allows you to create declarative UI components and manage their state. Kilua renders to plain HTML DOM (not canvas) and supports both Kotlin/Wasm and Kotlin/JS targets. It provides a lot of ready to use components. It's the only Kotlin UI framework with full support for true SSR (Server-Side Rendering).
Current version: 0.0.17
class App : Application() {
override fun start() {
root("root") {
var state by remember { mutableStateOf("Hello, world!") }
div {
+state
}
button("Add an exclamation mark") {
onClick {
state += "!"
}
}
}
}
}
fun main() {
startApplication(::App)
}
Kilua is the first Kotlin/Wasm and Kotlin/JS web framework supporting true Server-Side Rendering. SSR is a crucial concept in modern web development that enhances user experience and boosts SEO performance. Kilua SSR support is based on the possibility to run exactly the same application code both in the browser and in NodeJs environment. What's more, you can easily use WASM compilation target for much better performance.