Box(Modifier.fillMaxSize()){valinteractionSource=remember{MutableInteractionSource()}valisPressedbyinteractionSource.collectIsPressedAsState()// Create transition with pressed statevaltransition=updateTransition(targetState=isPressed,label="button_press_transition")fun<T>buttonPressAnimation()=tween<T>(durationMillis=400,easing=Ease)// Animate all properties using the transitionvalshadowAlphabytransition.animateFloat(label="shadow_alpha",transitionSpec={buttonPressAnimation()}){pressed->if(pressed)0felse1f}//to animate the colorvalcolorDropShadowbytransition.animateColor(label="shadow_color",transitionSpec={buttonPressAnimation()}){pressed->if(pressed)Color.TransparentelseColor.Green.copy(alpha=(0.5f))}valinnerShadowAlphabytransition.animateFloat(label="inner_shadow_alpha",transitionSpec={buttonPressAnimation()}){pressed->if(!pressed)0felse1f}Box(Modifier.clickable(interactionSource,indication=null){//...}.width(300.dp).height(200.dp).align(Alignment.Center).dropShadow(shape=RoundedCornerShape(70.dp),shadow=Shadow(radius=10.dp,spread=0.dp,color=Color.Green.copy(alpha=(0.5f)),offset=DpOffset(x=0.dp,0.dp),alpha=shadowAlpha))// note that the background needs to be defined before defining the inner shadow.background(color=Color(0xFFFFFFFF),shape=RoundedCornerShape(70.dp)).innerShadow(shape=RoundedCornerShape(70.dp),shadow=Shadow(radius=8.dp,spread=4.dp,color=Color.Green.copy(alpha=(0.5f)),alpha=innerShadowAlpha,offset=DpOffset(x=0.dp,0.dp)))){//...}}