
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.
Desktop (JVM):
./gradlew :sample:run
./gradlew :sample:createDistributable
Android:
./gradlew :sample:assembleDebug
./gradlew :sample:installDebug
Web (Wasm/JS):
./gradlew :sample:wasmJsBrowserDevelopmentRun
./gradlew :sample:wasmJsBrowserDistribution
iOS:
iosApp/iosApp.xcodeproj
ComposeUIViewController (see iosApp/iosApp/ContentView.swift).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.
./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.commonTest with Kotlin test dependencies, but no tests are currently present.Run all tests:
./gradlew testsample/src/androidMain/.../MainActivity.kt
sample/src/desktopMain/.../main.kt (main class: com.tarif.sample.MainKt)sample/src/wasmJsMain/.../main.kt
sample/src/iosMain/.../MainViewController.kt
iosApp/iosApp/ContentView.swift)Root 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.
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.
Desktop (JVM):
./gradlew :sample:run
./gradlew :sample:createDistributable
Android:
./gradlew :sample:assembleDebug
./gradlew :sample:installDebug
Web (Wasm/JS):
./gradlew :sample:wasmJsBrowserDevelopmentRun
./gradlew :sample:wasmJsBrowserDistribution
iOS:
iosApp/iosApp.xcodeproj
ComposeUIViewController (see iosApp/iosApp/ContentView.swift).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.
./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.commonTest with Kotlin test dependencies, but no tests are currently present.Run all tests:
./gradlew testsample/src/androidMain/.../MainActivity.kt
sample/src/desktopMain/.../main.kt (main class: com.tarif.sample.MainKt)sample/src/wasmJsMain/.../main.kt
sample/src/iosMain/.../MainViewController.kt
iosApp/iosApp/ContentView.swift)Root 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.