Connect with:
About Me
Alessandro Annini
I'm a freelance developer currently working at Leaff.it/ I really love famo.us framework and its amazing potential and if you're like me, and you want the web to win, please share some snippet of code for the community and grow faster with us
Categories
Meta
Famo.us Code | SwipeSync for Famo.us
694
post-template-default,single,single-post,postid-694,single-format-standard,ajax_updown_fade,page_not_loaded,,qode-theme-ver-6.2.1

SwipeSync for Famo.us

20 Aug SwipeSync for Famo.us

The SwipeSync component allows you to have simple swiping support in four directions. Personally I use these for app navigation.

Swiping east (left to right) means go back to the parent page (eg if the current location is home -> categories -> pie: go to categories)

Swiping west means go back to where I previously was down the tree (when the user went from pie to categories, this would go back to pie)

Swiping south would open the menu and swiping north would close the menu.

The velocity and distance can be easily adjusted, but I personally think the current values support a wide-enough amount of displays.

Below you can try out the sync by swiping in the results box. If you swipe successfully it will tell you the direction through an alert, otherwise it will provide you with data through an alert. If you click, nothing will happen.