Material 3 Expressive for Compose Multiplatform & Jetpack Compose with ZERO
@OptInheadaches.
expressive-compose is a clean, stable utility & wrapper library that brings Material 3 Expressive UI components, bouncy spring motion tokens, and morphing polygon shapes to Android, Desktop (JVM), iOS, JS, and WasmJs with zero boilerplate and no experimental warning annotations.
- Zero Opt-In Leakage: You never need to write
@OptIn(ExperimentalMaterial3ExpressiveApi::class)or clutter your compiler arguments. - Compose Multiplatform Ready: Shared
commonMaincode supporting Android, Desktop (JVM), iOS (iosX64,iosArm64,iosSimulatorArm64), JS, and WasmJs. - One-Liner First: Sensible defaults for all shapes, physics, and waves so you get stunning UI with a single line of code.
- Resilient Facade: As Material 3 Expressive evolves between Alpha, Beta, and Stable releases, your app's codebase remains intact while the wrapper bridges the changes under the hood.
ExpressiveComposeUI/
├── expressive-core/ // KMP Motion presets (Bouncy, Snappy) & 12+ Polygon Shapes
├── expressive-components/ // KMP WavySlider, ChunkySlider, FloatingToolbar, SplitButton, Progress
├── expressive-compose/ // KMP Umbrella module (import 1 to get all)
└── sample-catalog/ // Android showcase & interactive playground app
Add the dependency to your commonMain (or Android module) build.gradle.kts:
// Kotlin Multiplatform (commonMain)
kotlin {
sourceSets {
commonMain.dependencies {
implementation("io.github.namhoangdev31:expressive-compose:0.1.0-alpha01")
}
}
}Or in a single-platform Android module:
dependencies {
implementation("io.github.namhoangdev31:expressive-compose:0.1.0-alpha01")
}Interactive sine-curve wave that dynamically springs when dragged:
var volume by remember { mutableFloatStateOf(0.6f) }
ExpressiveWavySlider(
value = volume,
onValueChange = { volume = it }
)Thick modern track slider inspired by Android 15/16 system UI:
ExpressiveChunkySlider(
value = brightness,
onValueChange = { brightness = it }
)Instant polygon shapes (Scallop, Squircle, Clover, Flower, Sunny, SoftStar):
// Apply shape to any Composable:
Box(
modifier = Modifier
.size(64.dp)
.expressiveShape(ExpressiveShapes.Flower)
.background(MaterialTheme.colorScheme.primary)
)
// Smooth morphing between two shapes:
Box(
modifier = Modifier
.size(64.dp)
.morphShape(
start = RoundedPolygon.circle(),
end = RoundedPolygon.star(numVerticesPerRadius = 8),
progress = animatedProgress
)
)Spring-bouncy touch feedback and split action layouts:
// Bouncy Button
ExpressiveButton(onClick = { /* do action */ }) {
Text("Bouncy Button")
}
// Split Button
ExpressiveSplitButton(
leadingButton = {
FilledTonalButton(onClick = { save() }) { Text("Save") }
},
trailingButton = {
FilledTonalButton(onClick = { showMenu() }) {
Icon(Icons.Default.ArrowDropDown, contentDescription = null)
}
}
)Floating action toolbar with pill shape:
ExpressiveFloatingToolbar(expanded = isExpanded) {
IconButton(onClick = {}) { Icon(Icons.Default.Edit, contentDescription = null) }
IconButton(onClick = {}) { Icon(Icons.Default.Share, contentDescription = null) }
}// Wavy linear progress
ExpressiveWavyLinearProgress(progress = { downloadProgress })
// Continuous polygon morph loader
ExpressiveMorphLoader(size = 48.dp)To test and interact with all components on a connected device or emulator:
./gradlew :sample-catalog:installDebugApache License 2.0.