SuperRoundedShape for Compose Multiplatform.
compose-super-rounded-shape |
CMP | Kotlin |
---|---|---|
0.0.1-beta10 | 1.7.1 | 2.1.0 |
implementation("com.adamglin:compose-super-rounded-corner-shape:$version")
compose-super-rounded-corner-shape
supports these platforms:
- Android
- iOS
- Desktop (JVM)
- JS/Wasm (now using RoundedCornerShape compatibility, waiting androidx-graphics-shapes support web target. )
SuperRoundedCornerShape(50.dp, smooth = 1f)
smooth support from 0f to 1f, the design of ios is 0.6f.
Box {
Box(
modifier = Modifier
.padding(20.dp)
.size(300.dp)
.clip(RoundedCornerShape(50.dp)) // .clip(RoundedCornerShape(50.dp,50.dp,50.dp,50.dp,0.6f))
.background(Color.Black)
)
Box(
modifier = Modifier
.padding(20.dp)
.size(300.dp)
.clip(SuperRoundedCornerShape(50.dp, smooth = 1f))
.background(Color.Red)
)
}