diff --git a/README.md b/README.md index 597246b..28893ac 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Compose Shadow -A Kotlin Multiplatform implementation of drop shadows for Compose Multiplatform. +A Kotlin Multiplatform implementation of drop/inner shadows for Compose Multiplatform. This library will continue to be maintained until this is officially supported in Compose. @@ -12,8 +12,8 @@ This library will continue to be maintained until this is officially supported i | `compose-shadow` | CMP | Kotlin | |------------------|---------------|--------| +| 2.0.0 | 1.7.1 | 2.0.21 | | 1.0.0 | 1.7.0-rc01 | 2.0.21 | -| 0.0.1 | 1.7.0-dev1743 | 2.0.0 | ## Installation @@ -28,15 +28,16 @@ implementation("com.adamglin:compose-shadow:$version") 1. [x] Android (SDK > 28) 2. [x] iOS 3. [x] Desktop (JVM) +4. [x] JS/Wasm ## Usage Apply and customize shadow using the `dropShadow` Modifier: +### Drop Shadow ```kotlin Box( Modifier - .size(50.dp) .dropShadow( shape = RectangleShape, color = Color.Black.copy(.5f), @@ -48,8 +49,24 @@ Box( .background(Color.White), ) ``` +### Inner Shadow +```kotlin +Box( + Modifier + .innerShadow( + shape = RectangleShape, + color = Color.Black.copy(.5f), + offsetX = 4.dp, + offsetY = 4.dp, + blur = 10.dp, + spread = 5.dp, + ) + .background(Color.White), +) +``` ## Sample We provided this address [here](https://adamglin0.github.io/compose-shadow/sample/index.html) for viewing the wasm online examples. + ### Screenshots image image diff --git a/compose-shadow/build.gradle.kts b/compose-shadow/build.gradle.kts index 540a357..d08bdad 100644 --- a/compose-shadow/build.gradle.kts +++ b/compose-shadow/build.gradle.kts @@ -97,7 +97,7 @@ mavenPublishing { coordinates( groupId = "com.adamglin", artifactId = "compose-shadow", - version = "1.0.0" + version = "2.0.0" ) pom { name.set("compose-shadow")