Search code examples
androidkotlinandroid-jetpack-composecard

How to change elevation color in Compose?


Hi I am creating an app with Jetpack Compose I am and using Card composable with elevation. I need to change the elevation color, but I don't know how.

enter image description here


Solution

  • You can use the shadow modifier. For example:

             modifier = Modifier
            .shadow(ambientColor = Color.Blue, elevation = 15.dp)