a kotlin platform library for show drop shadow in compose. This library will continue to be actively updated until the official implementation of a complete shadow in Compose.
compose-shadow | cmp | kotlin |
---|---|---|
1.0.0 | 1.7.0-rc01 | 2.0.21 |
0.0.1 | 1.7.0-dev1743 | 2.0.0 |
implementation("com.adamglin:compose-shadow:$version")
compose-shadow supports platforms below.
add dropShadow by Modifier
.
Box(
Modifier
.size(50.dp)
.dropShadow(
shape = RectangleShape,
color = Color.Black.copy(.5f),
offsetX = 4.dp,
offsetY = 4.dp,
blur = 10.dp,
spread = 5.dp,
)
.background(Color.White),
)