Skip to content

Adaptive UI

Installation

Maven Central

Kotlin version Compose version Calf version
2.4.20 1.12.0 0.14.0
2.4.10 1.11.1 0.13.0
2.3.20 1.10.3 0.12.0
2.3.20 1.10.3 0.11.0
2.3.20 1.10.3 0.10.0
2.2.21 1.9.2 0.9.0
2.1.21 1.8.0 0.8.0
2.1.10 1.7.3 0.7.1
2.1.0 1.7.3 0.7.0
2.0.21 1.7.0 0.6.1
2.0.10 1.6.11 0.5.5
1.9.22 1.6.0 0.4.1
1.9.21 1.5.11 0.3.1
1.9.20 1.5.10 0.2.0
1.9.0 1.5.0 0.1.1

Android: Calf 0.14.0+ is built on Compose Multiplatform 1.12, whose Android artifacts require compileSdk = 37 (Android Gradle Plugin 9.4 is the first release that supports it). Calf's Android minSdk stays 23.

Add the following dependency to your module build.gradle.kts file:

api("com.mohamedrejeb.calf:calf-ui:0.14.0")

If you are using calf-ui artifact, make sure to export it to binaries:

Regular Framework

kotlin {
    targets
        .filterIsInstance<KotlinNativeTarget>()
        .filter { it.konanTarget.family == Family.IOS }
        .forEach {
            it.binaries.framework {
                export("com.mohamedrejeb.calf:calf-ui:0.14.0")
            }
        }
}

CocoaPods

kotlin {
    cocoapods {
        framework {
            export("com.mohamedrejeb.calf:calf-ui:0.14.0")
        }
    }
}

Important: Exporting calf-ui to binaries is required to make it work on iOS.

Components

Calf UI provides a set of adaptive UI components that adapt to the platform they are running on. Here's a list of available components: