compose-continuous-rounded-corner-shape

Enables creation of smooth, rounded corners with customizable smoothness in user interface components, enhancing design flexibility by supporting a smooth parameter ranging from 0f to 1f.

Android
JVM
iOS
macOS
Wasm
JS
GitHub stars41
Authorsadamglin0
Dependents0
LicenseMIT License
Creation datealmost 2 years ago

Last activity12 months ago
Latest release1.0.6 (12 months ago)

Maven Central Version

Compose ContinuousRoundedCornerShape

Provide the ability in Compose Multiplatform to create ContinuousRoundedCornerShape, which is a smooth rounded corner.

Versions

compose-continuous-rounded-shape CMP Kotlin
1.0.6 1.9.1 2.2.21
1.0.5 1.8.2 2.2.10
1.0.4 1.8.2 2.2.0
1.0.3 1.8.2 2.2.0
1.0.2 1.8.2 2.2.0
1.0.1 1.8.1 2.1.21

Installation

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

Platform support

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

  1. [x] Android
  2. [x] iOS
  3. [x] Desktop (JVM)
  4. [x] JS/Wasm (Support from 1.0.4)

wasm sample https://adamglin0.github.io/compose-continuous-rounded-corner-shape/sample/

[!IMPORTANT]
Before v1.0.4, you can still use ContinuousRoundedCornerShape in commonMain, but the smooth parameter on the JS/Wasm side will be ignored.

Use

The RoundedCornerShape has consistent parameters, with an additional smooth parameter, which supports values from 0f to 1f, with a default value of 0.6f, which is the default value in Apple's design system.

ContinuousRoundedCornerShape(50.dp, smooth = 1f)

smooth support from 0f to 1f, the design of ios is 0.6f.

e.g.

Box(
    modifier = Modifier
        .padding(20.dp)
        .size(300.dp)
        .clip(ContinuousRoundedCornerShape(50.dp, smooth = 1f))
        .background(Color.Red)
)

img.png

Android
JVM
iOS
macOS
Wasm
JS
GitHub stars41
Authorsadamglin0
Dependents0
LicenseMIT License
Creation datealmost 2 years ago

Last activity12 months ago
Latest release1.0.6 (12 months ago)

Maven Central Version

Compose ContinuousRoundedCornerShape

Provide the ability in Compose Multiplatform to create ContinuousRoundedCornerShape, which is a smooth rounded corner.

Versions

compose-continuous-rounded-shape CMP Kotlin
1.0.6 1.9.1 2.2.21
1.0.5 1.8.2 2.2.10
1.0.4 1.8.2 2.2.0
1.0.3 1.8.2 2.2.0
1.0.2 1.8.2 2.2.0
1.0.1 1.8.1 2.1.21

Installation

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

Platform support

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

  1. [x] Android
  2. [x] iOS
  3. [x] Desktop (JVM)
  4. [x] JS/Wasm (Support from 1.0.4)

wasm sample https://adamglin0.github.io/compose-continuous-rounded-corner-shape/sample/

[!IMPORTANT]
Before v1.0.4, you can still use ContinuousRoundedCornerShape in commonMain, but the smooth parameter on the JS/Wasm side will be ignored.

Use

The RoundedCornerShape has consistent parameters, with an additional smooth parameter, which supports values from 0f to 1f, with a default value of 0.6f, which is the default value in Apple's design system.

ContinuousRoundedCornerShape(50.dp, smooth = 1f)

smooth support from 0f to 1f, the design of ios is 0.6f.

e.g.

Box(
    modifier = Modifier
        .padding(20.dp)
        .size(300.dp)
        .clip(ContinuousRoundedCornerShape(50.dp, smooth = 1f))
        .background(Color.Red)
)

img.png