How to Add Custom Swipe Events to Panels

Description

Adding swipe gestures to mobile applications can create a better user interface experience for users.

Discussion

Swipe gestures are commonly found in mobile applications. You can add your own custom swipe events to Panels (Panel Cards, Panel Layouts, and Panel Navigators) using the onSwipe JavaScript event to create a better user experience in your mobile applications. For example, the JavaScript below navigates to 'PANELCARD_2' when the user swipes the panel to the left:

if (e.swipeDirection == 'left') {
    {dialog.object}.panelSetActive('PANELCARD_2');
}

Watch the video below to learn more about adding custom swipe events to Panels.