Skip to content

Latest commit

 

History

1,222 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

COUI

A ColorOS-styled UI library for Compose Multiplatform, based on Miuix.

Components are calibrated against ColorOS 16 (COUI) design: colors, metrics, motion curves and press feedback are transcribed from the real system implementation.

This library is experimental. APIs may change without notice.

Kotlin Compose Multiplatform Maven Central License

Supported Platforms

Android iOS macOS Desktop JsCanvas WasmJs

Documentation & Demo

Docs WasmJs Demo Other

Modules

Module Description
coui-ui Core UI component library (automatically includes coui-core)
coui-preference Preference components (SwitchPreference, CheckboxPreference, etc.), depends on coui-ui
coui-icons Extended icon library, can be used independently or with coui-ui (automatically includes coui-core)
coui-blur Blur effect library, can be used independently
coui-navigation3-ui Navigation3 UI library, can be used independently

Getting Started

kotlin {
    sourceSets {
        commonMain.dependencies {
            implementation("io.github.suqi8.coui.kmp:coui-ui:1.1.0")
            // Optional: Add coui-preference for preference components
            implementation("io.github.suqi8.coui.kmp:coui-preference:1.1.0")
            // Optional: Add coui-icons for more icons
            implementation("io.github.suqi8.coui.kmp:coui-icons:1.1.0")
            // Optional: Add coui-blur for blur effects
            implementation("io.github.suqi8.coui.kmp:coui-blur:1.1.0")
            // Optional: Add coui-navigation3-ui for navigation3 support
            implementation("io.github.suqi8.coui.kmp:coui-navigation3-ui:1.1.0")
            // Other dependencies...
        }
        // Other sourceSets...
    }
    // Other configurations...
}

Usage

  • Provide a color scheme via COUITheme(colors = ...), e.g., lightColorScheme() or darkColorScheme().
@Composable
fun AppTheme(
    content: @Composable () -> Unit
) {
    val colors = if (isSystemInDarkTheme()) darkColorScheme() else lightColorScheme()
    return COUITheme(
        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 COUITheme(
        controller = controller,
        content = content
    )
}

Credits

COUI is a fork of Miuix by YuKongA and the compose-miuix-ui contributors, rethemed to the ColorOS 16 design language. Both projects are licensed under Apache-2.0.

About

A UI library for Compose MultiPlatform

Resources

Stars

16 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages