Skip to content

Swiping UI library for mobile web apps. Create beautiful swiping transitions for your web app.

License

Notifications You must be signed in to change notification settings

ErlendEllingsen/webswipe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 

Repository files navigation

webswipe

WORK IN PROGRESS

webswipe logo

What's webswipe?

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.

Installation

Currently not accessible. Please wait until first release. Alternatively clone this project.

To do's

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 a setPreviousPage-method (see above). Should work almost as setPage but should set previous div.
  • Done Implement a rapidForceThreshold-option that should fire if a sudden but "powerful" swipe has been performed. This will cause the switch to trigger even though pageSwitchThreshold 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

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!

Other similar/related work

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

License

MIT

Copyright (c) 2017 Erlend Ellingsen