Kobweb: Modern framework for web apps in Kotlin, built upon Compose HTML
github.com·3h·
Discuss: Hacker News
Flag this post

K🕸️bweb

Kobweb is an opinionated Kotlin framework for creating websites and web apps, built on top of Compose HTML and inspired by Next.js and Chakra UI.

@Page
@Composable
fun HomePage() {
Column(
Modifier.fillMaxWidth().whiteSpace(WhiteSpace.PreWrap).textAlign(TextAlign.Center),
horizontalAlignment = Alignment.CenterHorizontally
) {
var colorMode by ColorMode.currentState
Button(
onClick = { colorMode = colorMode.opposite },
Modifier.borderRadius(50.percent).padding(0.px).align(Alignment.End)
) {
// Includes support for Font Awesome icons
if (colorMode.isLight) FaMoon() else FaSun()
}
H1 {
Text("Welcome to Kobweb!")
}
Span {
Text("Create rich, dynamic web apps with ...

Similar Posts

Loading similar posts...