Skip to content

Latest commit

 

History

History
57 lines (42 loc) · 1.3 KB

README.md

File metadata and controls

57 lines (42 loc) · 1.3 KB

Compose SuperRoundedCornerShape

SuperRoundedShape for Compose Multiplatform.

Maven Central Version


Versions

compose-super-rounded-shape CMP Kotlin
0.0.1-beta10 1.7.1 2.1.0

Installation

implementation("com.adamglin:compose-super-rounded-corner-shape:$version")

Platform support

compose-super-rounded-corner-shape supports these platforms:

  1. Android
  2. iOS
  3. Desktop (JVM)
  4. JS/Wasm (now using RoundedCornerShape compatibility, waiting androidx-graphics-shapes support web target. )

Use

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)
    )
}

img.png