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.
kotlin {
sourceSets {
commonMain.dependencies {
implementation("top.yukonga.miuix.kmp:miuix:<version>")
// Other dependencies...
}
// Other sourceSets...
}
// Other configurations...
}
@Composable
fun App() {
// Use ThemeController to control color scheme mode
val controller = remember { ThemeController(ColorSchemeMode.System) }
// Available modes:
// ColorSchemeMode.System, Light, Dark, DynamicSystem, DynamicLight, DynamicDark
MiuixTheme(controller = controller) {
Scaffold(
topBar = {
// TopBar
},
bottomBar = {
// BottomBar
},
floatingActionButton = {
// FloatingActionButton
},
) {
// Other Content...
}
}
}
