SwipeBox

fun SwipeBox(modifier: Modifier = Modifier, isOnEditState: Boolean, defaultColor: Color = MaterialTheme.colorScheme.background, activeColor: Color = MaterialTheme.colorScheme.primary, cornersShape: Shape = MaterialTheme.shapes.medium, swipeListener: (Boolean) -> Unit, content: @Composable BoxScope.() -> Unit)

Composable to create a swipe effect. The more far away for the original position the user is, the harder it will be to keep moving, which mimics an elastic effect. The recomended usage of this compose is to create a swipe to edit functionality.

Parameters

modifier
isOnEditState

Boolean

defaultColor

Color The color of the container in the idle state

activeColor

Color The color of the container in the active state

cornersShape

Shape The shape of the container

swipeListener

Listener of the swipe action

content

The inner Composable