What's new in Compose Multiplatform 1.13.0-beta01
Here are the highlights for this EAP release:
You can find the full list of changes for this release on GitHub. For details about specific component versions, refer to the Dependencies section.
Across platforms
Several features that were Experimental in previous Compose Multiplatform releases are now Stable. You no longer need to opt in to use them:
Creating a
ComposeUIView()on iOS and configuring it withComposeUIViewportConfiguration.Configuring
ComposeViewport()for web withComposeViewportConfiguration.
iOS
Content-based sizing for Compose Multiplatform views in SwiftUI and UIKit
Compose Multiplatform views embedded in SwiftUI or UIKit can now report a preferred size based on the available parent space. Native containers can use this size to fit Compose content, for example, to adjusting a view’s height while keeping its width fixed.
On iOS 16 and later, Compose Multiplatform views use PreferredSizeReportingStrategy.SizeThatFits by default, so no additional sizing configuration is needed.
Create a Compose view on the Kotlin side:
Then, in the SwiftUI UIViewRepresentable wrapper, pass the sizing proposal to sizeThatFits(). Use UIView.noIntrinsicMetric for dimensions that SwiftUI leaves unspecified:
In UIKit, after Auto Layout sets the Compose Multiplatform view’s width, use sizeThatFits() to get its preferred height and update its height constraint:
Saving and autofilling passwords
On iOS, Compose Multiplatform can now show native prompts to save login credentials and autofill Compose text fields. Keep both the username and password fields on screen so iOS can recognize the form as a login form.
To configure the fields, use PlatformImeOptions in your iOS source set. Set textContentType(UITextContentTypeUsername) for the username and isSecureTextEntry(true) for the password. For example, inside a composable annotated with @OptIn(ExperimentalComposeUiApi::class):
Web
WebGL interop
Compose Multiplatform now provides an experimental API for rendering WebGL textures. WebGLRenderTarget exposes a Compose Painter that displays WebGL graphics alongside other Compose UI elements.
Use rememberWebGLRenderTarget() to create a target, draw into it with render {}, and display its painter in an Image. For example, this fragment renders a blue texture inside a composable with @OptIn(ExperimentalComposeUiApi::class):
For more advanced use cases, the target also provides access to the underlying WebGL rendering context.
System window insets on web
Compose Multiplatform for web now supports system window insets through the standard WindowInsets APIs. Your UI can draw edge-to-edge while respecting safe areas, including display cutouts and the on-screen keyboard.
To enable this feature, set enableBrowserWindowInsets to true in your ComposeViewport configuration. Use the standard inset modifiers to adjust the layout:
You can also access the insets directly through APIs such as WindowInsets.safeDrawing and WindowInsets.ime.
For edge-to-edge rendering, add viewport-fit=cover to the page's viewport meta tag:
Configurable font fallback on web
In the previous release, we introduced automatic font fallback for characters not covered by your application's fonts. This release lets you choose the source for fallback fonts or disable automatic downloads.
By default, Compose Multiplatform downloads fallback fonts from Google Fonts. To use a different source, set fontFallbackUrl in the window configuration:
To disable automatic font fallback, set fontFallbackUrl to null:
Desktop
Faster desktop startup with AppCDS or AOT
Compose Multiplatform now supports Application Class-Data Sharing (AppCDS) and Ahead-of-Time (AOT) caching for desktop applications. Both options use an archive to reduce startup time.
In benchmarks on a small demo application, prebuilt AOT caches reduced cold startup time:
On macOS (M1 Ultra), from 2017 ms to 424 ms — 4.8× faster.
On Windows (Dell Precision 5690), from 1356 ms to 650 ms — 2.1× faster.
These measurements cover the time from launching the process to displaying the window. Results depend on the application and environment. For AOT startup optimization, we recommend the latest JetBrains Runtime (JBR) 25 release.
To enable these startup options, configure the aot {} block in your build.gradle.kts file:
Choose a mode based on your JDK version and packaging requirements:
Mode | Minimum JDK | Behavior |
|---|---|---|
| — | Default, no startup optimizations. |
| 19 | Creates an AppCDS archive when the user's first session ends, speeding up subsequent launches. |
| 21 | Creates an AppCDS archive before packaging, speeding up startup from the first launch. |
| 25 | Creates an AOT cache before packaging, also improving linking and JIT warmup. |
Both prebuild modes run your application during packaging to create the archive. During this cache-generation run, the plugin sets the compose.aot.training-run system property to true.
Note that the prebuild modes increase the distributable size because the application includes the archives.
Smoother window resizing on macOS and Windows
Compose Multiplatform now supports smoother interactive window resizing when using Metal on macOS or DirectX on Windows. Rendering stays synchronized with window resizing, reducing stutter and preventing white bars along the window edges.
To enable this behavior, set the system property for your renderer to true before showing any windows. Set it with System.setProperty() or a JVM -D flag:
macOS with Metal:
skiko.rendering.macos.metalSynchronousLiveResizeWindows with DirectX:
skiko.rendering.windows.direct3DSynchronousLiveResize
The feature requires Compose content to fill the entire window.
Dependencies
Library | Maven coordinates | Based on Jetpack version |
|---|---|---|
Runtime |
| |
UI |
| |
Foundation |
| |
Material |
| |
Material3 |
| |
Material3 Adaptive |
| |
Lifecycle |
| |
Navigation |
| |
Navigation3 |
| |
Navigation Event |
| |
Savedstate |
| |
WindowManager Core |
|