Skip to content

compose-miuix-ui/miuix

Repository files navigation

Miuix

A UI library for Compose Multiplatform.

This library is experimental. APIs may change without notice.

Kotlin Compose Multiplatform Maven Central License

Supported Platforms

Android iOS macOS Desktop JsCanvas WasmJs

Demos

JsCanvas WasmJs Other

Getting Started

kotlin {
    sourceSets {
        commonMain.dependencies {
+           implementation("top.yukonga.miuix.kmp:miuix:<version>")
            // Other dependencies...
        }
        // Other sourceSets...
    }
    // Other configurations...
}

Usage

  • Provide a color scheme via MiuixTheme(colors = ...), e.g., lightColorScheme() or darkColorScheme().
@Composable
fun AppTheme(
    content: @Composable () -> Unit
) {
    val colors = if (isSystemInDarkTheme()) darkColorScheme() else lightColorScheme()
    return MiuixTheme(
        colors = colors,
        content = content
    )
}
  • Use ThemeController to manage modes and enable Monet dynamic colors. Pass keyColor to set a custom seed color.
@Composable
fun AppTheme(
    content: @Composable () -> Unit
) {
    val controller = remember {
        ThemeController(
            ColorSchemeMode.MonetSystem,
            keyColor = Color(0xFF3482FF)
        )
    }
    return MiuixTheme(
        controller = controller,
        content = content
    )
}

Screenshots

Screenshot 001 Screenshot 002 Screenshot 003
Screenshot 004 Screenshot 005 Screenshot 006

Packages

 
 
 

Contributors 18

Languages