Stylish Swipe To Dismiss Box
A swipe-to-dismiss container that reveals backgroundContent as the user swipes content to either side, then settles or dismisses based on the swipe distance.
This is the Finish-layer wrapper around the Material 3 SwipeToDismissBox: it forwards every parameter unchanged and keeps the M3 signature, so callers can use the familiar backgroundContent / content slot contract without touching experimental or deprecated M3 overloads. The component is intentionally unstyled — the surface, shape, and colors of both the background and the foreground content are owned by the caller, matching Material's guidance that swipe-to-dismiss backgrounds are item-specific (e.g. a red destructive background). Use it together with rememberStylishSwipeToDismissBoxState.
Parameters
The SwipeToDismissBoxState driving this container. Create it with rememberStylishSwipeToDismissBoxState.
Modifier applied to the container Box root.
Whether swiping from start to end can dismiss. Defaults to true.
Whether swiping from end to start can dismiss. Defaults to true.
Whether pointer gestures are active. When false, the content cannot be swiped (e.g. while another gesture is in progress). Defaults to true.
Called when the content settles into a dismissed state, receiving the dismissed direction. Defaults to no-op.
The foreground content that can be swiped. Receives RowScope.