onSwipeLeft() open div like side-menus

Hi, i’m trying to implement a div, that opens and closes like the side-menu. i could get the onSwipeLeft working with a console.log, but how did they made, that the menu is coming with you as long as you swipe till it’s fully out?

Somebody can give me a hint?