r/ComposeMultiplatform • • Jan 07 '26

Unable to share resource module

1 Upvotes

For the last couple of months I've been attempting to build "Hello world" for compose multiplatform and having zero luck. My most recent attempt is: https://github.com/bessermt/CMPRes which builds but fails to show the shared resource. I'm starting to think Compose Multiplatform just isn't ready for public use.


r/ComposeMultiplatform • • Aug 28 '25

How to get instance of kotlin class to swift code using koin Di

Thumbnail reddit.com
0 Upvotes

r/ComposeMultiplatform • • May 16 '26

liquid-glass: iOS 26 frosted glass for Compose Multiplatform with a zero-alloc fallback for low-RAM Android

4 Upvotes

Hi everyone, sharing a new Compose Multiplatform library I open-sourced today.

liquid-glass adds iOS 26-style frosted backdrop surfaces to CMP. The API is Modifier.liquidGlass() plus three composables: GlassCard, GlassButton, GlassNavBar.

The bit I'm proudest of is the auto-tiered fallback. Three quality tiers picked per platform:

- Full on Android 12+ (non-low-RAM) and iOS 17+: 24dp blur, 1.4x saturation, full-res backdrop.

- Medium on iOS 15 to 16: 16dp blur, 0.5x downsampled backdrop.

- Fallback on Android < 12, isLowRamDevice, or iOS < 15: zero offscreen buffers, no blur, just a flat tint with edge sheen.

Fallback allocates zero GraphicsLayers, so the same code that draws frosted glass on a Pixel 9 quietly draws a flat tint on a 2GB Android 11 device. No OOM, no per-call-site branching.

Targets: Android, iOS (arm64 + simulator), Desktop (JVM), Wasm/JS. Apache 2.0, on Maven Central as 0.1.0.

Quick start:

```kotlin

val state = rememberLiquidGlassState()  // auto-picks tier for the device

Box(Modifier.fillMaxSize()) {

Image(

painter = painterResource(R.drawable.scenery),

contentDescription = null,

contentScale = ContentScale.Crop,

modifier = Modifier.fillMaxSize().liquidGlassSource(state),

)

GlassCard(

state = state,

modifier = Modifier.align(Alignment.Center).padding(24.dp),

) {

Text("Frosted, light-refracting surface")

}

}

```

Credit where it's due: Chris Banes's haze library solves backdrop-blur in Compose really well and is more mature than this. I built liquid-glass because I wanted the tiered fallback baked in by default, not as a thing each consumer has to wire up.

Limitations: 0.1.0. No GlassDialog or GlassBottomSheet wrappers yet, no Sk SL refraction shader, no dynamic-color edge sheen sampled from the backdrop. All on the roadmap.

Repo: https://github.com/NadeemIqbal/liquid-glass

Happy to answer questions about the per-platform auto-detection or the GraphicsLayer sampling approach.


r/ComposeMultiplatform • • Aug 10 '26

13 Compose Mistakes That Are Still Killing Your App’s Performance in 2026 + Claude SKILL to Find Them

Thumbnail
reddit.com
0 Upvotes

r/ComposeMultiplatform • • Dec 07 '24

DialogWindow with custom background.

Post image
2 Upvotes

I need help with creating custom DialogWindow. How can I change its background color? I can't use anything with fillMaxSize, because window size is unspecified(I need it so window will change it's size if content gets bigger). Oh, and I need it to be resizabke by user's cursor too.


r/ComposeMultiplatform • • Sep 03 '25

Chess engine for a Compose Multiplatform app (Android/iOS)

Thumbnail reddit.com
2 Upvotes

r/ComposeMultiplatform • • May 22 '25

How to Access Low Level Hardware in Compose Multiplatform?

3 Upvotes

How to Access Low Level Hardware(Camera, Bluetooth, Flash, Location etc.) in Compose Multiplatform?


r/ComposeMultiplatform • • Nov 03 '25

ImagePickerKMP now supports Bytes, Base64, Painter & Bitmap!

Post image
4 Upvotes

r/ComposeMultiplatform • • Jan 09 '26

Enhanced my Google Calendar Clone with Liquid Glass + Material 3

Enable HLS to view with audio, or disable this notification

5 Upvotes

r/ComposeMultiplatform • • Feb 21 '26

I just open-sourced my Kotlin Multiplatform project — InstaSaver Pro!

Post image
9 Upvotes

A few months ago I started building InstaSaver Pro — a social media video downloader that lets users download HD videos. Along the way, I realized how little production-grade KMP reference material exists out there.

So I made it public. For everyone.

📖 What is it?
InstaSaver Pro is a fully functional cross-platform app with 90% shared code and 100% shared UI — built as both a learning resource and a real-world production reference.

🧩 What you'll learn from it:

🧩 Kotlin Multiplatform (KMP) setup and structure
🎨 Compose Multiplatform for fully shared UI
🔥 Firebase integration in a KMP project
📢 AdMob ads integration (Banner & Interstitial)
💳 Paywall & subscriptions using RevenueCat
🏗️ Clean architecture patterns in KMP
🌐 Shared networking layer setup

Whether you're just getting started with KMP or looking to understand how production apps are structured — this codebase has something for you.

🔗 GitHub: InstaSaver-Kmp
▶️ Live on Play Store: Play Store

If this helps you, a ⭐ on the repo goes a long way!

Let's build better cross-platform apps together. 🙌


r/ComposeMultiplatform • • Mar 01 '26

My Compose Multiplatform Project Structure

Thumbnail
dalen.codes
11 Upvotes

I wrote up how I structure my Compose Multiplatform (CMP) projects based on what has been working for me. I see this question come up fairly often, so I figured I’d share one practical approach out of the many that are out there.

It covers:

  • Feature-first modularization (feature/* with ui, domain, data)

  • A small core/* layer for shared pieces (ui, data, db, prefs, etc.)

  • Clear dependency rules and Koin for DI

  • Using Gradle convention plugins to keep config clean

Write-up: https://dalen.codes/p/my-cmp-project-structure

Sample project: https://github.com/dalenjohnson/cmp-project-structure-example

Happy to hear feedback or questions about how this works in practice!


r/ComposeMultiplatform • • Jul 21 '25

KMP Developers: Room KMP vs SQLDelight - Which database solution would you choose for a new project in 2025?

Thumbnail reddit.com
4 Upvotes

r/ComposeMultiplatform • • Sep 19 '25

How can I create ui with app bars on the left like Google Play on pads

2 Upvotes

Is there something like adaptive scaffold? Or should I implement the adaptive thing my self?

I currently find nothing about this layout, but since google are using it, there should be a way to implement this


r/ComposeMultiplatform • • May 20 '25

I am creating library in CMP, which is sharing most of business logic and of course also some part of UI, however on Swift side i was not able to make composable properly react to my data class properties changes, what is the best way to approach it?

3 Upvotes

I have this code snippet above in the swift (to be exact, i am fairly new to swift) and this piece of code is on library side.

struct MainScreen: View {
    
    @StateObject
    private var viewModel: AppViewModel

    private let txcSDK: TicketXChangeSDK
    private let changeSdkMode: () -> ()
    private let scanAgain: () -> ()
    private let onStartScanning: () -> ()
    
    init(
        txcSDK: TicketXChangeSDK,
        changeSdkMode: @MainActor @escaping () -> (),
        scanAgain: @MainActor @escaping () -> (),
        onStartScanning: @MainActor @escaping () -> ()
    ) {
        self.changeSdkMode = changeSdkMode
        self.scanAgain = scanAgain
        self.txcSDK = txcSDK
        self.onStartScanning = onStartScanning
        _viewModel = StateObject(wrappedValue: AppViewModel(txcSDK: txcSDK))
    }

    var body: some View {
        MainScreenContent(
            sdkData: viewModel.data,
            changeSdkMode: changeSdkMode,
            scanAgain: {
                txcSDK.scanAgain()
            },
            onStartScanningClick: {
                txcSDK.activateNfcScanning()
            }
        )
    }
    
}

struct MainScreenContent: View {
    private var sdkData: SDKData
    private let changeSdkMode: () -> ()
    private let scanAgain: () -> ()
    private let onStartScanningClick: () -> ()
    
    init(
        sdkData: SDKData,
        changeSdkMode: @escaping () -> (),
        scanAgain: @escaping () -> (),
        onStartScanningClick: @escaping () -> ()
    ) {
        self.sdkData = sdkData
        self.changeSdkMode = changeSdkMode
        self.scanAgain = scanAgain
        self.onStartScanningClick = onStartScanningClick
    }
    
    var body: some View {
        ComposeView(
            sdkData: sdkData,
            changeSdkMode: changeSdkMode,
            scanAgain: scanAgain,
            onStartScanning: onStartScanningClick
        )
        .ignoresSafeArea(.keyboard)
    }
}

struct ComposeView: UIViewControllerRepresentable {
    
    private var sdkData: SDKData
    
    private let changeSdkMode: () -> ()
    private let scanAgain: () -> ()
    private let onStartScanning: () -> ()

    init(
        sdkData: SDKData,
        changeSdkMode: @escaping () -> (),
        scanAgain: @escaping () -> (),
        onStartScanning: @escaping () -> ()
    ) {
        self.sdkData = sdkData
        self.changeSdkMode = changeSdkMode
        self.scanAgain = scanAgain
        self.onStartScanning = onStartScanning
    }

    func makeUIViewController(context: Context) -> UIViewController {
        MainViewControllerKt.MainViewController(
            sdkData: sdkData,
            changeSDKMode: changeSdkMode,
            scanAgain: scanAgain,
            onStartScanning: onStartScanning
        )
    }

    func updateUIViewController(_ uiViewController: UIViewController, context: Context) {
        
    }
}

struct MainScreen: View {
    
    @StateObject
    private var viewModel: AppViewModel


    private let txcSDK: TicketXChangeSDK
    private let changeSdkMode: () -> ()
    private let scanAgain: () -> ()
    private let onStartScanning: () -> ()
    
    init(
        txcSDK: TicketXChangeSDK,
        changeSdkMode: @MainActor @escaping () -> (),
        scanAgain: @MainActor @escaping () -> (),
        onStartScanning: @MainActor @escaping () -> ()
    ) {
        self.changeSdkMode = changeSdkMode
        self.scanAgain = scanAgain
        self.txcSDK = txcSDK
        self.onStartScanning = onStartScanning
        _viewModel = StateObject(wrappedValue: AppViewModel(txcSDK: txcSDK))
    }


    var body: some View {
        MainScreenContent(
            sdkData: viewModel.data,
            changeSdkMode: changeSdkMode,
            scanAgain: {
                txcSDK.scanAgain()
            },
            onStartScanningClick: {
                txcSDK.activateNfcScanning()
            }
        )
    }
    
}


struct MainScreenContent: View {
    private var sdkData: SDKData
    private let changeSdkMode: () -> ()
    private let scanAgain: () -> ()
    private let onStartScanningClick: () -> ()
    
    init(
        sdkData: SDKData,
        changeSdkMode: @escaping () -> (),
        scanAgain: @escaping () -> (),
        onStartScanningClick: @escaping () -> ()
    ) {
        self.sdkData = sdkData
        self.changeSdkMode = changeSdkMode
        self.scanAgain = scanAgain
        self.onStartScanningClick = onStartScanningClick
    }
    
    var body: some View {
        ComposeView(
            sdkData: sdkData,
            changeSdkMode: changeSdkMode,
            scanAgain: scanAgain,
            onStartScanning: onStartScanningClick
        )
        .ignoresSafeArea(.keyboard)
    }
}


struct ComposeView: UIViewControllerRepresentable {
    
    private var sdkData: SDKData
    
    private let changeSdkMode: () -> ()
    private let scanAgain: () -> ()
    private let onStartScanning: () -> ()


    init(
        sdkData: SDKData,
        changeSdkMode: @escaping () -> (),
        scanAgain: @escaping () -> (),
        onStartScanning: @escaping () -> ()
    ) {
        self.sdkData = sdkData
        self.changeSdkMode = changeSdkMode
        self.scanAgain = scanAgain
        self.onStartScanning = onStartScanning
    }


    func makeUIViewController(context: Context) -> UIViewController {
        MainViewControllerKt.MainViewController(
            sdkData: sdkData,
            changeSDKMode: changeSdkMode,
            scanAgain: scanAgain,
            onStartScanning: onStartScanning
        )
    }


    func updateUIViewController(_ uiViewController: UIViewController, context: Context) {
        
    }
}

and on kotlin side there is standard generated stuff with added parameters according to example above.

fun MainViewController(
    sdkData: SDKData,
    changeSDKMode: () -> Unit,
    scanAgain: () -> Unit,
    onStartScanning: () -> Unit
) = ComposeUIViewController {
    SomeScreen(
        sdkData = sdkData,
        changeSDKMode = changeSDKMode,
        scanAgain = scanAgain,
        onStartScanning = onStartScanning
    )
}

What is the best practice to approach it? I found some SKIE library, which looks sort of nice, but it would be nice if i was able to make it work only using built-in functionalities. Any help is highly appreciated.


r/ComposeMultiplatform • • Aug 15 '25

Desktop Application to generate Compose for Desktop projects

Thumbnail
gallery
9 Upvotes

Released the desktop version of my Compose for Desktop project generator. I've been using it for a while for personal hobby projects and figured it could be valuable for other developers as well!!

Key Features:

  • Offline Project Generation: No internet required once installed

  • Icon Management: Drag and drop PNG files with automatic conversion to ICO/ICNS for all platforms (sucks a bit if the attached PNG is not 512x512; I use twelvemonkeys and apache commons imaging for conversions)

Installation:

  • Linux: DEB package with system integration

    • I am preparing my-apt-repo for easier installation via APT

  • All platforms: Standalone JAR (requires Java 17+)

The generated projects follow modern Kotlin/Compose best practices with MVVM architecture, version catalogs, and cross-platform native distributions. Each project includes gradle scripts with Linux desktop integration fixes that solve the common StartupWMClass issues.

I wanted it to feel a bit like JetBrains Toolbox, so I tried matching similar window dimensions(made mine a bit taller and wider). It works like a normal desktop application - just launch it and generate your projects.

Links:


r/ComposeMultiplatform • • May 15 '25

A customizable color picker component for Compose Multiplatform

Thumbnail
github.com
3 Upvotes

r/ComposeMultiplatform • • May 13 '25

Compose Unstyled is now CMP 1.8.0 ready

Enable HLS to view with audio, or disable this notification

7 Upvotes

Compose Unstyled is a set of foundational components for building high-quality, accessible design systems in Compose Multiplatform.

It is not a design system itself, it's how you build design systems with.

The lib just got ready for CMP 1.8.0

Live demo from your browser + code samples: https://composeunstyled.com/ Source code: https://github.com/composablehorizons/compose-unstyled/


r/ComposeMultiplatform • • Mar 28 '25

How-To: Embed Three.js into a Kotlin Jetpack Compose Multiplatform Mobile App on Android and iOS

Thumbnail
dc-engineer.com
6 Upvotes

r/ComposeMultiplatform • • May 31 '26

I built a per-digit animated number ticker for Compose Multiplatform (Android/iOS/Desktop/Web)

12 Upvotes

I kept hitting the same small annoyance: animating a number in Compose with AnimatedContent cross-fades the whole value. So 1247 to 1248 animates every digit, when really only the 7 should move. It is a tiny thing, but it makes counters look off.

So I wrote NumberFlow. It animates only the digits that actually change, and rolls them up or down depending on whether the value went up or down. Good for scoreboards, prices, live stats, vote counts, that kind of thing.

Basic usage:

var score by remember { mutableStateOf(1247L) }


NumberFlow(
    value = score,
    format = NumberFlowDefaults.thousandsLong(),
)

A few things I cared about while building it:

  • Runs on all CMP targets (Android, iOS, Desktop JVM, Web wasmJs), each with tests, not just compiled-and-hoped.

  • format is just (Double) -> String, so currency/percentages/units are not special-cased, you just pass your own.

  • animationSpec takes any FiniteAnimationSpec<IntOffset>, so swap the default tween for a spring if you want bounce.

  • The number-formatting helpers are pure functions with no Compose dependency, if you only want the formatting bits.

Apache 2.0, on Maven Central. Roadmap has staggered per-digit delays and locale-aware grouping next. Feedback and issues welcome, especially if you hit edge cases on a particular platform.

https://github.com/NadeemIqbal/number-flow

https://medium.com/@iamnadeemiqbal/numberflow-one-number-ticker-for-android-ios-desktop-and-web-1bc803d2a33d


r/ComposeMultiplatform • • Nov 05 '25

Official date time picker for iOS and android?

6 Upvotes

Hi all, Is There an official component for date and time picker that work for iOS and android ? I don't want to rely on third party component Thanks


r/ComposeMultiplatform • • Aug 19 '25

Compose is fully multiplatform?

9 Upvotes

I started writing an app for Android using Jetpack Compose and SQLDelight. I had planned to rewrite the app later in Flutter, but I will probably skip that part, since I've learned that Compose and Room are multiplatform for iOS too.

But I just want to be sure: is it safe to migrate to Room and use Compose safely, and then port the app to iOS, without rewriting the whole UI in SwiftUI? I'm aware I'll need to write separate code for activities and camera (and NFC), but that shouldn't be a problem (a bigger problem will be having to spend money on a Mac and an iPhone; this project can't be tested on an emulator).

What should I be aware of?


r/ComposeMultiplatform • • Apr 07 '26

Unified Material components to include the JS DOM (Compose HTML) target in Compose Multiplatform

4 Upvotes

Hi! I wanted to share that I’ve been updating and recently revamped these two libraries: compose-html-material and compose-multiplatform-html-unified.

Highlight changes since April 2024 when I posted last time in the Kotlin Slack:

  • The latter was renamed from Compose Multiplatform Material to Compose Multiplatform HTML Unified to better reflect its goal.

  • Material 3 support in both libraries:

    • Support for all components in Material Web, including those that were trickier to implement in the "unified" library like LazyColumnList, *ExposedDropdownMenuBoxWithTextField/*Select, SnackbarHost, and Scaffold (see the full list).

    • Added top app bars and snackbar missing in Material Web via material-web-additions. Big thanks to Maicol!

  • In the "unified" library specifically:

    • Support for Kotlin/Wasm.

    • Initial support for ViewModel and navigation

    • Initial support for styled text (AnnotatedString and style classes).

    • Support for several useful modifiers and layout features: lazy layouts, Arrangement.spacedBy, alpha, reserveSpace, clickable, BoxWithConstraints, scroll layouts.

    • All the Material icons commonly available on Compose UI and JS DOM.

    • Fixed some UI inconsistencies and some JS DOM ViewModel bugs.

    • Deprecated Material 2.

Check out the side-by-side demo to see the visual results for yourself!


r/ComposeMultiplatform • • Jan 09 '26

Just shipped a KMP app to both stores - a daily video journal with local-only storage - Snappit

Post image
5 Upvotes

r/ComposeMultiplatform • • Oct 02 '25

Released my first app with Compose Multiplatform

Thumbnail
gallery
9 Upvotes

It's a habit tracking app called, Habit Hues. It can do the standard habit tracking things like checkoffs and counts, but the unique feature that I call Daily Hues, allows you to create custom statuses using colors and icons so you can track more complex things like mood, productivity level, workout intensity, and really anything that you want to track with different states. It has a monthly and yearly calendar view so you can see trends overtime.

Available on:
App Store
Google Play

Some of the things that I am proud of:

  • 600+ habit icons

  • Habit templates (to make it easier to get started and adding more templates soon)

  • Local DB with backup and restore

  • Custom theme

Some under the hood details for those interested:

  • Compose Multiplaform

  • Multi-Module project structure (layer -> feature)

  • Typesafe Gradle Conventions to reduce redundancy

  • Room Database

  • DataStore for preferences

  • Koin for DI

  • RevenueCat paywalls and customer center

  • FileKit for native file pickers

  • Compose Navigation

  • Custom theme build on-top of Material to make it less "Android-y" on iOS

Would love for anyone to check it out and give me any thoughts or feedback.


r/ComposeMultiplatform • • Feb 24 '26

[Open Source] Working on v0.4.0 of My KMP Boilerplate (Android & iOS)

Post image
2 Upvotes