Skip to content

Yume-Li/miuix

 
 

Repository files navigation

Miuix

Miuix is a shared UI library for Compose Multiplatform.

Now Supported: Android / Desktop(JVM) / iOS / WasmJs / Js / macOS(Native).

This library is experimental, any API would be changed in the future without any notification.

License Maven Central

Web Example

JsCanvas Demo / WasmJs Demo

Start

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

Usage

  • Direct colors: provide a color scheme to MiuixTheme(colors = ...), e.g. built-in lightColorScheme() / darkColorScheme().
@Composable
fun AppWithColors() {
    val colors = lightColorScheme()
    MiuixTheme(colors = colors) { /* Content */ }
}
  • Controller-based: control modes via ThemeController and enable Monet dynamic colors; pass keyColor to set a custom seed color.
@Composable
fun AppWithMonet() {
    val controller = remember {
        ThemeController(
            ColorSchemeMode.MonetSystem,
            keyColor = Color(0xFF3482FF)
        )
    }
    MiuixTheme(controller = controller) { /* Content */  }
}

Screenshot

screenshot-001 screenshot-002 screenshot-003
screenshot-004 screenshot-005 screenshot-006

About

A UI library for Compose MultiPlatform

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Kotlin 99.7%
  • Other 0.3%