
Enables creation of Material Design 3 themes, offering dynamic themes with AMOLED support, persistent settings, pre-configured components, and detailed customization options for theme appearance and behavior.
ktheme is a Compose Multiplatform library written to provide material design 3 (MD3) based theme, with essential components to configure it.
| Platform | Support |
|---|---|
| Android | ✅ |
| Desktop | ✅ |
| iOSX64/iOSArm64/iosSimulatorArm64 | ✅ |
| macosX64/macosArm64 | ✅ |
| js/WasmJs | ✅ |
[versions]
ktheme = "0.0.3"
[libraries]
ktheme = { module = "com.feraxhp.ktheme:ktheme-compose", version.ref = "ktheme" }kotlin > sourceSets > commonMain.dependencies
implementation(libs.ktheme)import com.feraxhp.ktheme.DynamicTheme
@Composable
internal fun App() = DynamicTheme { // base color default is: 0X4C662B, to change it call baseColor: Int
// Your KMP App content
}val dts = LocalThemeSettings.currentOrThrow // Provider
// Access Settings
val seedColor by dts.seedColor.collectAsState()
val secondary by dts.secondary.collectAsState()
val tertiary by dts.tertiary.collectAsState()
val error by dts.error.collectAsState()
val theme by dts.theme.collectAsState()
val useDynamicColor by dts.useDynamicColor.collectAsState()
val useAmoled by dts.useAmoled.collectAsState()
val style by dts.style.collectAsState()
val contrastLevel by dts.contrastLevel.collectAsState()
val extendedFidelity by dts.extendedFidelity.collectAsState()
val hasAnimation by dts.hasAnimation.collectAsState()
// LocalThemeSettings: Provides set-functions to change every theme Setting.ktheme provides access to all the settings of the Dynamic Theme by accessing this 2 Composition Providers:
To see a sample of the implementation you can access :sample:composeApp commonMain
Since Version 0.0.3
This library is based on MaterialKolor
ktheme is a Compose Multiplatform library written to provide material design 3 (MD3) based theme, with essential components to configure it.
| Platform | Support |
|---|---|
| Android | ✅ |
| Desktop | ✅ |
| iOSX64/iOSArm64/iosSimulatorArm64 | ✅ |
| macosX64/macosArm64 | ✅ |
| js/WasmJs | ✅ |
[versions]
ktheme = "0.0.3"
[libraries]
ktheme = { module = "com.feraxhp.ktheme:ktheme-compose", version.ref = "ktheme" }kotlin > sourceSets > commonMain.dependencies
implementation(libs.ktheme)import com.feraxhp.ktheme.DynamicTheme
@Composable
internal fun App() = DynamicTheme { // base color default is: 0X4C662B, to change it call baseColor: Int
// Your KMP App content
}val dts = LocalThemeSettings.currentOrThrow // Provider
// Access Settings
val seedColor by dts.seedColor.collectAsState()
val secondary by dts.secondary.collectAsState()
val tertiary by dts.tertiary.collectAsState()
val error by dts.error.collectAsState()
val theme by dts.theme.collectAsState()
val useDynamicColor by dts.useDynamicColor.collectAsState()
val useAmoled by dts.useAmoled.collectAsState()
val style by dts.style.collectAsState()
val contrastLevel by dts.contrastLevel.collectAsState()
val extendedFidelity by dts.extendedFidelity.collectAsState()
val hasAnimation by dts.hasAnimation.collectAsState()
// LocalThemeSettings: Provides set-functions to change every theme Setting.ktheme provides access to all the settings of the Dynamic Theme by accessing this 2 Composition Providers:
To see a sample of the implementation you can access :sample:composeApp commonMain
Since Version 0.0.3
This library is based on MaterialKolor