Kotlin logo

Kotlin

A concise multiplatform language developed by JetBrains

Multiplatform

Compose Multiplatform 1.7.0 Released

Compose Multiplatform is a declarative UI framework built by JetBrains that allows developers to share UI implementations across different platforms. The 1.7.0 release brings more components to common code, support for type-safe navigation, significant performance improvements on iOS, and changes from the latest Jetpack Compose update.

Here are the highlights of this release:

  • Material3 adaptive and WindowSizeClass are now available in common code.
  • Compose Multiplatform now provides compile-time safety for your navigation graph.
  • Compose Multiplatform 1.7.0 paired with Kotlin 2.0.20 performs significantly faster and smoother on iOS than the combination of previous stable releases.

For the complete list of changes, refer to our What’s New page or release notes on GitHub.

Get Started with Compose Multiplatform

New common modules

With Compose Multiplatform 1.7.0, the following components have become available in common code:

  • Material3 adaptive modules from material3.adaptive, such as adaptive, adaptive-layout, and adaptive-navigation.
  • The Material3 adaptive navigation suite.
  • Material3 WindowSizeClass classes.
  • The material-navigation library.

Type-safe navigation

You can now rely on Compose Multiplatform for compile-time safety in navigation graphs. To ensure type safety, we adopted Jetpack Compose’s type-safe approach to passing objects along a navigation route.


See the Type safety in Navigation Compose guide for API details.

Performance improvements on iOS

In Kotlin 2.0.20, the Kotlin/Native team contributed significantly to making Compose apps on iOS perform faster and smoother. The Compose Multiplatform 1.7.0 release makes the best of these optimizations, along with performance improvements from Jetpack Compose 1.7.0.

We benchmarked Compose Multiplatform 1.6.11 paired with Kotlin 2.0.0 and Compose Multiplatform 1.7.0 paired with Kotlin 2.0.20, and the comparison shows the following improvements:

  • The LazyGrid benchmark simulates LazyVerticalGrid scrolling, which is closest to real-life use cases, and performs ~9% faster on average. It also shows a significantly reduced number of missed frames. Take a look at the p1/p50 percentile graph below: It shows increased frame stability and confirms that there are now hardly any missed frames, as the average processing time is less than the standard 8.33 ms latency of a 120Hz iPhone screen.
  • The VisualEffects benchmark renders many randomly placed components and works 3.6 times faster – the average CPU time per 1000 frames was reduced from 8.8 to 2.4 seconds.
  • The AnimatedVisibility composable animates showing and hiding an image and demonstrates ~6% faster rendering.

Scrolling LazyVerticalGridRendering 1000 frames with VisualEffects

Feel free to test it yourself and let us know whether your iOS app feels smoother!

On top of that, Kotlin 2.0.20 introduces experimental support for concurrent marking in the garbage collector (GC). Enabling concurrent marking shortens GC pauses and demonstrates even bigger improvements for all benchmarks. We measured only half as many missed frames as before, as well as a drop in the worst p25 GC pause time from 1.7 ms to 0.4 ms for the LazyGrid benchmark. Give it a try and share your feedback.

Update to Compose Multiplatform 1.7.0

Improved touch interop between Compose Multiplatform and native iOS

This release improves touch handling for iOS interop views. Imagine a large interop video player used in a scrollable context such as a lazy list – it would be quite an unpleasant experience to scroll through the list when most of the screen is taken up by a video that intercepts all touches while Compose Multiplatform is unaware of them.

Compose Multiplatform now tries to detect whether a touch is meant for an interop view or should be processed by Compose. This makes it possible to process touch events that happen in a UIKit or a SwiftUI area inside your Compose Multiplatform app.

Check out our Handling touch events with interop on iOS documentation page for details.

Drag and drop on desktop

Compose Multiplatform 1.7.0 implements drag and drop for desktop. You can now use the dragAndDropSource and dragAndDropTarget modifiers to specify which composable is a starting drag point and which one accepts the dropped data.

Drag and drop on desktop

Shared element transitions

Compose Multiplatform now supports seamless transitions between composables that share consistent elements. These transitions are often useful in navigation, helping users follow the trajectory of changes in the UI. Check out the Jetpack Compose documentation for details on API and Android samples, and give the new animation a try on other platforms.

Shared element transitions

Resources updates and improvements

This release brings a variety of updates for resources – let’s take a look at the most notable ones:

  • The resource library now supports using test resources in Compose Multiplatform projects.
  • All multiplatform resources are now packed into Android assets, allowing Android Studio to generate previews for Compose Multiplatform composables in Android source sets.
  • You can now directly access Android resources via URI from external libraries such as WebView and media player.
  • The new customDirectory setting in the configuration DSL allows you to associate a custom directory with a specific source set.
  • Resources are now mapped to string IDs for easy access.

What else to read

image description