WORK IN PROGRESS
webswipe is a pure javascript library created for creating neat looking swiping-based page transitions for web applications. This is meant to replicate the user experienced many native applications have when "swiping back" in history on apps.
Most modern popular applications have this, including Facebook Messenger, Snapchat, Reddit, Spotify, etc.
I made this library because I after relatively extensive research found no existing decent libraries that perform this task.
Currently not accessible. Please wait until first release. Alternatively clone this project.
As written the project is WIP and has not reached an alpha stage. Contributors are more than welcome, but the to do's on this list is primarily a list of tasks I've written for myself.
- Done
When a previous page is loaded, a callback should be called. (E.g. set further history) - Done
Implement asetPreviousPage
-method (see above). Should work almost assetPage
but should set previous div. - Done
Implement arapidForceThreshold
-option that should fire if a sudden but "powerful" swipe has been performed. This will cause the switch to trigger even thoughpageSwitchThreshold
may not be reached. - Make sure that width of
activePage
stays the same even though moved. (Currently wrap-text triggers because element gets smaller). (Handle off screen width) - Done
Implement touch vs mouse detection - Done
Implement touch events (currently only mouse) (See above) - Create a better looking demo
- Create usage guide
Contributions are more than welcome! See the To do's above or add your own features. Submit a PR when you're ready to go!
In an effort to introduce some normal native functions to native web apps I have made some other libraries: pull to reload for web apps and a tab bar system for web apps
MIT
Copyright (c) 2017 Erlend Ellingsen