Compose Multiplatform

On this page 8

Compose Multiplatform is a declarative user interface framework developed by JetBrains that lets teams write one Kotlin UI codebase and run it on Android, iOS, desktop and web. In mobile app development, it extends the programming model of Jetpack Compose beyond Android and sits on top of Kotlin Multiplatform, which shares business logic, while Compose Multiplatform adds the shared screens themselves.

The framework matters because it closes the gap that Kotlin Multiplatform originally left open: logic could be shared, but UI had to be written twice. With Compose Multiplatform, a team can decide per screen whether to share the interface or keep it native, which makes it a gradual adoption path rather than an all-or-nothing rewrite.

How Compose Multiplatform renders a shared interface

Compose Multiplatform works by compiling composable functions written in Kotlin for each target platform and drawing the result with a platform-appropriate renderer. A composable describes what the screen should look like for a given state; when that state changes, the Compose runtime recomposes only the affected parts of the UI tree.

The rendering path differs by platform. On Android, the framework delegates to Jetpack Compose itself, so shared code becomes ordinary Android Compose code. On iOS, desktop and web, JetBrains uses Skia through the Skiko library, a graphics engine that draws every pixel onto a canvas instead of creating native platform widgets. This design gives pixel-consistent output across platforms, but it also means the framework must reimplement behaviors such as text selection, scrolling physics and accessibility mapping for each non-Android target.

The following table summarizes how each target is compiled and rendered.

TargetKotlin compilationRendering approachMaturity
AndroidKotlin/JVM to Android bytecodeNative Jetpack ComposeStable
iOSKotlin/Native to machine codeSkia canvas via SkikoStable since 2025
DesktopKotlin/JVMSkia canvas via SkikoStable
WebKotlin/WasmSkia canvas in the browserBeta
Compilation and rendering by target platform

Because iOS code is produced by Kotlin/Native, the shared module is packaged as an Apple framework that an Xcode project links like any other dependency. A single entry point, typically a ComposeUIViewController, hosts the Compose hierarchy inside a standard iOS view controller.

Core building blocks and libraries

Compose Multiplatform reuses the familiar Compose layers, so developers who know Jetpack Compose recognize most of the API surface. The runtime, foundation, Material and Material 3 libraries are published as multiplatform artifacts, and JetBrains maintains multiplatform ports of several Android Jetpack components.

LibraryPurposeNotes
Compose runtimeState tracking and recompositionShared with Jetpack Compose
Compose foundationLayouts, gestures, lazy listsPlatform-neutral primitives
Material 3Design system componentsMaterial look on every platform
Compose resourcesImages, strings, fontsGenerated type-safe accessors
NavigationScreen routing and back stackMultiplatform port of Jetpack Navigation
Lifecycle and ViewModelScreen-scoped state holdersMultiplatform ports maintained by JetBrains
Main libraries used in Compose Multiplatform projects

Since Kotlin 2.0, the Compose compiler plugin ships with the Kotlin compiler itself, so the Kotlin version and the compiler plugin version always match. This change removed a frequent source of build errors, in which an outdated compiler plugin blocked a Kotlin upgrade.

How it compares with other cross-platform frameworks

Compose Multiplatform competes with Flutter, React Native and .NET MAUI, but its architecture places it in a distinct position. Its main differentiator is that shared UI is optional: the underlying Kotlin Multiplatform model allows any mix of shared and native screens within the same app.

FrameworkLanguageUI renderingSharing model
Compose MultiplatformKotlinNative on Android, Skia elsewhereShared UI optional per screen
FlutterDartOwn engine on all platformsEntire UI shared by default
React NativeJavaScript or TypeScriptNative platform viewsUI and logic shared
.NET MAUIC#Native platform controlsUI and logic shared
SwiftUI plus Jetpack ComposeSwift and KotlinFully nativeNothing shared
Compose Multiplatform compared with related frameworks

The closest conceptual neighbor is Flutter, because both frameworks draw their own pixels on iOS. The key difference is that Compose Multiplatform produces native Android Compose code on Android and compiles to native binaries without a virtual machine on iOS, while sharing data models and networking code with an existing Kotlin backend or Android codebase.

Interoperability with native iOS and Android code

Interoperability is a central design goal because few production apps can share every screen. On iOS, a Compose screen can embed UIKit views through UIKitView and UIKitViewController, which is how teams integrate maps, video players or camera previews. In the other direction, a Compose screen wrapped in a view controller can be placed inside SwiftUI through UIViewControllerRepresentable.

Platform-specific behavior is accessed through Kotlin’s expect and actual declarations: shared code declares an expected function, and each platform source set provides its actual implementation. This mechanism keeps platform APIs out of shared code while still allowing direct calls to iOS frameworks such as Foundation or AVFoundation from Kotlin.

  • Android integration is seamless, because shared composables are ordinary Jetpack Compose functions.
  • iOS integration requires a Swift host app, an Xcode build phase and attention to framework export settings.
  • Desktop integration can embed Swing components and use native window menus and system trays.

When to choose Compose Multiplatform

Compose Multiplatform fits best when a team already writes Kotlin for Android and wants to reach iOS without hiring a separate Swift team for every feature. The decision depends on existing skills, design requirements and how much platform-specific behavior the product needs.

SituationRecommended approachReason
Existing Jetpack Compose Android appAdopt Compose MultiplatformComposables move to shared code with little change
App needs strictly native iOS lookShare logic, keep SwiftUI screensSkia rendering does not use UIKit controls
Internal or brand-driven designShare most screensCustom design hides platform differences
Heavy use of iOS-only frameworksShare selected screens onlyInterop overhead grows with native dependencies
Team skilled mainly in JavaScriptConsider React NativeLower retraining cost
Decision guide for adopting the framework

Limitations and common mistakes

The most important limitation is that iOS screens are not native UIKit controls. Behaviors that iOS users expect, such as precise text editing gestures, scroll bounce and VoiceOver accessibility, are reproduced by the framework, and edge cases can differ from a SwiftUI app. Teams should test these paths on real devices rather than assume parity.

Other trade-offs concern size and tooling. Bundling Skia and the Kotlin/Native runtime typically adds several megabytes to the iOS binary, and Kotlin/Native build times are longer than incremental Android builds. Debugging shared Kotlin code from Xcode is possible but less polished than debugging Swift.

SymptomLikely causeFix
iOS app feels slightly unnaturalMaterial defaults on iOSAdapt theming and navigation patterns per platform
Slow iOS buildsFull Kotlin/Native recompilationSplit modules and cache framework builds
Crashes when calling iOS APIsThreading or memory assumptionsRespect main-thread rules in actual implementations
Missing library on iOSDependency is Android-onlyChoose multiplatform libraries or write an expect wrapper
Frequent problems and how to address them

A common mistake is treating the framework as a reason to ignore platform conventions. Successful teams share layout and state handling but still adjust navigation gestures, typography and system dialogs to match each platform.

Stripped to the essentials

Compose Multiplatform lets developers design an app screen once and show it on Android phones, iPhones, computers and in a web browser. Instead of building the same screen twice in two different languages, the team writes it once in Kotlin.

Think of it like a recipe that works in any kitchen. The cook follows the same instructions, and each kitchen uses its own stove to make the dish. The result looks and tastes the same everywhere. The key takeaway is simple: one team, one codebase, several platforms, with the option to build special screens separately when a platform needs them.

Where it is applied

A regional bank has a mature Android app built with Jetpack Compose and a small iOS team that struggles to keep up with new features. The bank decides to move its account overview, transfer form and settings screens into a shared Compose Multiplatform module, while keeping the iOS camera-based check deposit screen in SwiftUI.

The shared module reuses the existing Kotlin networking and validation code. The iOS app hosts the shared screens through a view controller, and the SwiftUI check deposit screen calls the same shared transfer logic. Developers adjust fonts and the back gesture so the iOS version follows Apple conventions.

After two release cycles, the bank ships new features on both platforms in the same sprint. Roughly two thirds of the UI code is now shared, the iOS team focuses on platform-specific features, and feature parity between the two apps stops being a recurring problem.