Skip to content

Commit

Permalink
Release/2.0.0 (#38)
Browse files Browse the repository at this point in the history
  • Loading branch information
adamglin0 authored Nov 19, 2024
1 parent a76e335 commit 0744ff8
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 4 deletions.
23 changes: 20 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -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.

Expand All @@ -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

Expand All @@ -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),
Expand All @@ -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
<img width="300" alt="image" src="https://github.com/user-attachments/assets/36d15219-d4ea-4de9-84fe-df2cbceb0e2e">
<img width="300" alt="image" src="https://github.com/user-attachments/assets/cf1b42d1-5d92-4259-93a6-f0883b7d9dc7">
Expand Down
2 changes: 1 addition & 1 deletion compose-shadow/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit 0744ff8

Please sign in to comment.