compose-multiplatform README

The project's README from github.com/JetBrains/compose-multiplatform. As one markdown file: README.md.

official project stable prerelease dev

Compose Multiplatform logo and name

Compose Multiplatform is a declarative framework for sharing UI code across multiple platforms with Kotlin. It is based on Jetpack Compose and developed by JetBrains and open-source contributors.

You can choose the platforms across which to share your UI code using Compose Multiplatform:

For example, you can share UIs between iOS and Android or Windows and MacOS.

Shared UIs of the iOS, Android, desktop, and web apps

iOS

Compose Multiplatform shares most of its API with Jetpack Compose, the Android UI framework developed by Google. You can use the same APIs to build user interfaces for both Android and iOS.

Since Compose is built on top of Kotlin Multiplatform, you can easily access native APIs, such as the Camera API, and embed complex native UI views, such as MKMapView.

Get started with Compose Multiplatform

Android

When Android is one of your targets, you get the same experience for Android as if you were developing an Android app using Jetpack Compose.

Get started with Compose Multiplatform

Desktop

Compose Multiplatform targets the JVM and supports high-performance hardware-accelerated UI rendering on all major desktop platforms – macOS, Windows, and Linux.

It has desktop extensions for menus, keyboard shortcuts, window manipulation, and notification management.

Get started with Compose Multiplatform

Web

Web support is in Beta, making it a great time to give it a try. Check out our blog post to learn more about the progress made to reach this milestone. We would appreciate your feedback on it in the public Slack channel #compose-web. If you face any issues, please report them on YouTrack.

You can experiment with sharing your mobile or desktop UIs with the web. Compose Multiplatform for web is based on Kotlin/Wasm, the newest target for Kotlin Multiplatform projects. It allows Kotlin developers to run their code in the browser with all the benefits that WebAssembly has to offer, such as good and predictable performance for your applications.

Get started with Compose Multiplatform for web

Libraries

Compose HTML

Compose HTML is a library targeting Kotlin/JS that provides Composable building blocks for creating web user interfaces with HTML and CSS.

Note that Compose HTML is not a multiplatform library. It can be used only with Kotlin/JS.

Learn more

Get help

There are dedicated public Slack channels for #compose-ios, #compose-desktop and #compose-web, as well as the general #compose channel.

If you encounter any issues, please report them on YouTrack.

compose-multiplatform (JetBrains/compose-multiplatform)

Searching Database…

What is this?A declarative UI framework from JetBrains, built on top of Jetpack Compose, for sharing one UI codebase across platforms in Kotlin.
So is it basically Jetpack Compose that also runs off Android?Essentially yes: it shares most of its API with Jetpack Compose, Google's Android UI framework, so you write the same Compose code for Android and iOS instead of learning a separate UI system per platform.
What does setting up a project look like?The README links a getting-started guide per target — iOS, Android, desktop and web each have their own; projects are built with the standard Kotlin Multiplatform Gradle tooling.
Do I need to be an Android developer to use it?You write Kotlin, and Android work is identical to Jetpack Compose development. Since the APIs are shared, existing Compose knowledge transfers directly to the other targets.
Is the web target ready for production?No — web is explicitly in Beta, while iOS, Android and desktop are presented as ready. Web feedback is collected via the #compose-web Slack channel and issues go to YouTrack.
Which platforms can one UI codebase cover?iOS, Android, desktop (Windows, macOS, and Linux) and web. Web is the only target still marked Beta.
What does the desktop target give me beyond the mobile UI model?It runs on the JVM with high-performance hardware-accelerated rendering on macOS, Windows and Linux, and adds desktop-only extensions for menus, keyboard shortcuts, window manipulation and notification management.
Can I still call native platform APIs, like the camera or native map views?Yes. Compose sits on top of Kotlin Multiplatform, so you can access native APIs such as the Camera API and embed complex native UI views like MKMapView in your shared UI.
How does the web target actually run my code?Kotlin is compiled to WebAssembly via Kotlin/Wasm, so the app runs in the browser with WebAssembly's benefits, such as good and predictable performance, rather than being rewritten in JavaScript.
What is Compose HTML and how is it different?A separate library targeting Kotlin/JS that provides Composable building blocks for web UIs made of HTML and CSS. Unlike Compose Multiplatform it is not multiplatform — it works only with Kotlin/JS.
What are similar projects?gkd, slint, Avalonia, flutter, animeko, uno, kotlin, ab-download-manager
Creator
JetBrains
Size
282.6 MB
Stars
19.4K
Age
6y
Commits · 90 Days