MaterializeKMP
1.4.0indexedCompose Multiplatform library offers a Material Design 3 theme with essential components for seamless configuration across Android, iOS, Web, and Desktop environments.
Compose Multiplatform library offers a Material Design 3 theme with essential components for seamless configuration across Android, iOS, Web, and Desktop environments.
MaterializeKMP is a Kotlin Multiplatform library for Compose Multiplatform that provides a Material Design 3–based theme system and essentials to keep your UI consistent across platforms.
Targets supported:
The repository also contains a multiplatform Sample app demonstrating usage on all targets, plus an iOS host project.
| Android | Web | iOS |
|---|---|---|
![]() | ![]() | ![]() |
Add the dependency to your commonMain source set:
commonMain {
dependencies {
implementation("com.tarifchakder:material-theme:1.1.0")
}
}
Using a Version Catalog:
[versions]
materialtheme = "1.1.0"
[libraries]
material-theme = { module = "com.tarifchakder:material-theme", version.ref = "materialtheme" }
Repository uses the Gradle Wrapper. Replace ./gradlew with gradlew.bat on Windows.
Note: For iOS, Gradle can build KMP frameworks for targets (iosX64/iosArm64/iosSimulatorArm64). The included Xcode project has been wired to the shared sample code via the generated framework; if something fails, open Xcode and let it resolve Swift packages and build steps.
commonTest with Kotlin test dependencies, but no tests are currently present.Run all tests:
./gradlew testRoot settings: see settings.gradle.kts, versions in gradle/libs.versions.toml and version.properties.
See the sample for a complete setup. Core entry point for theming is DynamicTheme in the library. Example (simplified):
DynamicTheme(
seedColor = Color(0xFF00BCD4),
isDarkTheme = false,
isDynamicColor = true,
isAmoled = false,
isInvertColors = false
) {
// Your Compose UI here
}
MaterializeKMP is licensed under the MIT License.
This library draws inspiration from the Material Color Palette by the Material Foundation. For details on their licensing, see their LICENSE file:
See LICENSE for the repository license.
Contributions are welcome! If you have an idea for a new feature or an enhancement:
develop: git checkout -b feature/my-new-feature.develop and describe your changes.Please consider adding tests and updating documentation for user-facing changes.
Desktop (JVM):
./gradlew :sample:run./gradlew :sample:createDistributableAndroid:
./gradlew :sample:assembleDebug./gradlew :sample:installDebugWeb (Wasm/JS):
./gradlew :sample:wasmJsBrowserDevelopmentRun./gradlew :sample:wasmJsBrowserDistributioniOS:
iosApp/iosApp.xcodeprojComposeUIViewController (see iosApp/iosApp/ContentView.swift)../gradlew build./gradlew clean./gradlew :material-theme-kit:dokkaHtml./gradlew :material-theme-kit:publishToMavenLocal./gradlew publishAllPublicationsToMavenCentralRepository
.github/workflows/release.yml – the workflow is triggered on version bump in version.properties.sample/src/androidMain/.../MainActivity.ktsample/src/desktopMain/.../main.kt (main class: com.tarif.sample.MainKt)sample/src/wasmJsMain/.../main.ktsample/src/iosMain/.../MainViewController.ktiosApp/iosApp/ContentView.swift)Surfaced from shared tags and platforms — no rankings paid for.