Paul Krill
Editor at Large

JetBrains previews Jetpack Compose for Web

news
May 5, 20212 mins

Jetpack Compose for Web brings Google’s toolkit for building reactive user interfaces with Kotlin to the web browser.

reactive systems diagram 900x600
Credit: IDG

JetBrains is offering its first technology preview of Jetpack Compose for the Web, which brings Google’s Kotlin toolkit for building reactive user interfaces to the web.

Introduced on May 3, Jetpack Compose for Web works on top of Kotlin Multiplatform, enabling developers to build an application for Android, the desktop, or web using Jetpack Compose as the UI framework, all within the same project. Kotlin Multiplatform fosters sharing of platform-agnostic functionality such as business logic through common code, while still enabling developers to implement platform-specific functionality.

Jetpack Compose for Web follows JetBrains’ Compose for Desktop, for building reactive desktop UIs for Kotlin, also still in early development, with a 1.0 release planned. With the Jetpack Compose for Web preview, developers can reuse all core Compose state management concepts across platforms. The preview currently does not allow developers to directly reuse existing widgets, but the Kotlin Multiplatform expect/actual mechanism can be used to build common widgets with implementations for all three platforms.

The Jetpack Compose for Web preview includes two types of APIs for designing user interfaces in Kotlin: a composable DOM API, to control the document object model, and a web implementation of widgets from Jetpack Compose for Desktop and Jetpack Compose for Android. JetBrains also is designing a type-safe DSL for style sheets, through which CSS rules can be expressed in Kotlin. Developers can modify styles based on the state of a Compose application, Jetbrains said.

Instructions on getting started with Jetpack Compose for Web can be found on GitHub.

Paul Krill

Paul Krill is editor at large at InfoWorld. Paul has been covering computer technology as a news and feature reporter for more than 35 years, including 30 years at InfoWorld. He has specialized in coverage of software development tools and technologies since the 1990s, and he continues to lead InfoWorld’s news coverage of software development platforms including Java and .NET and programming languages including JavaScript, TypeScript, PHP, Python, Ruby, Rust, and Go. Long trusted as a reporter who prioritizes accuracy, integrity, and the best interests of readers, Paul is sought out by technology companies and industry organizations who want to reach InfoWorld’s audience of software developers and other information technology professionals. Paul has won a “Best Technology News Coverage” award from IDG.

More from this author