hapticDrawerSwipe

A modifier that adds haptic feedback when a drawer is swiped.

This modifier observes the DrawerState to detect when a swipe gesture initiates the opening or closing of a drawer. It triggers a haptic feedback effect at the beginning of the drawer's animation to enhance the user experience. The feedback is provided only once per swipe gesture.

Return

A Modifier that applies the haptic feedback behavior.

Parameters

state

The DrawerState of the drawer to monitor for swipe events.