Create web apps in Kotlin

Kobweb is an opinionated framework built on top of Compose HTML. It includes everything you need to build rich, dynamic websites, as well as web applications, while being able to leverage the greater Kotlin ecosystem.

Welcome to Kobweb!

Create rich, dynamic web apps with ease, leveraging Kotlin and Compose HTML
@Page
@Composable
fun HomePage() {
  Column(Modifier.fillMaxWidth(), horizontalAlignment = Alignment.CenterHorizontally) {
    Row(Modifier.align(Alignment.End)) {
      var colorMode by ColorMode.currentState
      Button(
        onClick = { colorMode = colorMode.opposite },
        Modifier.borderRadius(50.percent).padding(0.px)
      ) {
        // Includes support for Font Awesome icons
        if (colorMode.isLight) FaMoon() else FaSun()
      }
    }
    H1 {
      Text("Welcome to Kobweb!")
    }
    Row(Modifier.flexWrap(FlexWrap.Wrap)) {
      SpanText("Create rich, dynamic web apps with ease, leveraging ")
      Link("https://kotlinlang.org/", "Kotlin")
      SpanText(" and ")
      Link("https://github.com/JetBrains/compose-multiplatform/#compose-html", "Compose HTML")
    }
  }
}

Why Kobweb?

Build your Compose HTML apps quicker and easier
Page RoutingAnnotate a composable method with @Page to make it a route
Live ReloadingAn environment built from the ground up around live reloading
Light and Dark UIBuilt-in support for multiple color modes
Component librarySilk is a UI layer included with Kobweb and built upon Compose HTML
Component stylingPowerful and simple API for defining and overriding styles
SEO-friendlySupports static site exports for improved SEO
Server API RoutesAnnotate methods with @Api to generate server API endpoints
Markdown supportOut-of-the-box Markdown support
Font Awesome / Material Design IconsEasily include Font Awesome and/or Material Design icons
Compose extensionsAdds familiar Modifier, Box, Row, and Columns concepts to Compose HTML
JavaScript EcosystemCompose HTML means you can leverage a massive ecosystem of NPM packages and JS libraries
Open sourceAn open source project built with a friendly license and a welcoming community

Kobweb CLI

Kobweb CLI provides commands to handle the tedious parts of building a Compose HTML app, including project setup and configuration
This site is open source
Copyright © 2024 Varabyte. All rights reserved.