All Projects → lyfeyaj → Swipe

lyfeyaj / Swipe

Licence: mit
Swipe is the most accurate touch slider. Support both React and Angular.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Swipe

Vue Awesome Swiper
🏆 Swiper component for @vuejs
Stars: ✭ 12,072 (+1320.24%)
Mutual labels:  swipe, slide
Vuetify Swipeout
👆 A swipe out example built with Vue CLI 3 + Vuetify + Swiper.
Stars: ✭ 117 (-86.24%)
Mutual labels:  mobile, swipe
React Easy Swipe
Easy handler for common swipe operations
Stars: ✭ 85 (-90%)
Mutual labels:  mobile, swipe
React Swipeable List
Swipeable list component for React.
Stars: ✭ 86 (-89.88%)
Mutual labels:  mobile, swipe
Cupertino Pane
🎉📱Multi-functional panes and boards for next generation progressive applications
Stars: ✭ 267 (-68.59%)
Mutual labels:  mobile, swipe
Vue Swipe Mobile
😃 A siwpe (touch slider) component for Vue2
Stars: ✭ 97 (-88.59%)
Mutual labels:  swipe, slide
React Swipeable
React swipe event handler hook
Stars: ✭ 1,348 (+58.59%)
Mutual labels:  mobile, swipe
Fullpage.js
fullPage plugin by Alvaro Trigo. Create full screen pages fast and simple
Stars: ✭ 32,974 (+3779.29%)
Mutual labels:  swipe, slide
RNSlidingButton
React Native Button component which support Slide event to perform action.
Stars: ✭ 19 (-97.76%)
Mutual labels:  slide, swipe
Slider
Touch swipe image slider/slideshow/gallery/carousel/banner mobile responsive bootstrap
Stars: ✭ 2,046 (+140.71%)
Mutual labels:  mobile, swipe
React Responsive Carousel
React.js Responsive Carousel (with Swipe)
Stars: ✭ 1,962 (+130.82%)
Mutual labels:  mobile, swipe
Pagepiling.js
pagePiling plugin by Alvaro Trigo. Create a scrolling pile of sections. http://alvarotrigo.com/pagePiling/
Stars: ✭ 3,993 (+369.76%)
Mutual labels:  swipe, slide
We Swiper
✨ 微信小程序触摸内容滑动解决方案we-swiper
Stars: ✭ 311 (-63.41%)
Mutual labels:  swipe, slide
Swiper
Most modern mobile touch slider with hardware accelerated transitions
Stars: ✭ 29,519 (+3372.82%)
Mutual labels:  mobile, swipe
Brainpowerapp
A visual memory training game, a mobile game made with Xamarin for both Android and IOS .
Stars: ✭ 17 (-98%)
Mutual labels:  mobile
Swipeabletabbarcontroller
UITabBarController with swipe interaction between its tabs.
Stars: ✭ 919 (+8.12%)
Mutual labels:  swipe
Lab teaching 2016
Repository for materials/codes from Kording lab teaching 2016
Stars: ✭ 16 (-98.12%)
Mutual labels:  slide
Flutterfoodybite
Flutter representation of a Restaurant app UI.
Stars: ✭ 880 (+3.53%)
Mutual labels:  mobile
Didicallcar
这是我自己做的一个类似滴滴打车的Android出行项目,主要针对滴滴等出行平台一直饱受质疑的“人车不符”问题,以及当前越发火热的或计划和出海战略,给出行项目增加了下面几个功能: 1. RFID识别验证功能:在司机证件或者车内识别硬件嵌入RFID识别芯片,乘客使用手机读取到芯片信息,并且通过网络发送到出行平台数据库进行验证(我用JNI加了一个C语言的MD5加密算法对识别到的信息进行了加密)。如果不是合规的“人”或“车”,则不能完成订单并向平台或监管单位汇报当前位置。(为了方便读者测试,可以使用手机读取任何一个加密或非加密RFID芯片,比如银行卡、公交卡等,我在代码中的验证前阶段把芯片信息都换成我自己的司机信息,确保读者测试时可以收到服务器的回复) 2. 海外版功能:点击切换当前语言。 3. 司机证件号码识别功能:读取司机证件上的证件号码,也可以用来与出行平台数据库的接单司机信息进行。I complete this whole project on my own . Including Android application programming,web server ( Apache + PHP + MySQL), and UI. 1.Map route planing。You can use mobile phone choose pick up & destination address,application provide address name hint and draw optimized route for user , then call car for you. 2.RFID authentication function:User can use application to scan driver license or other RFID hardware, then use NDK MD5 algorithm encrypt RFID number, and send it to Web Server Database, check with driver information and authenticate ID number , if ID number coherent with driver info , send back driver information to User and continue call car order . record user location and alert if ID not coherent. 3.Driver License Number Recognition : Application can recognize driver license digit number ,and also can send to web server for authentication & feed back result to user.
Stars: ✭ 935 (+10%)
Mutual labels:  mobile
Xtoolkit.whitelabel
Modular MVVM framework for fast creating powerful cross-platform applications with Xamarin.
Stars: ✭ 22 (-97.41%)
Mutual labels:  mobile

Swipe

Build Status npm version npm GitHub license

Swipe is the most accurate touch slider. It is extremely lightweight (only 6kb minified) and works across all browsers, including IE8+.

Support both React.js and Angular.js(v1)

Note

This repo is a continuation of the dead Swipe project. Our mission is to keep Swipe alive and moving forward, with maintenance fixes and new features. Pull Requests are welcome!

Usage

Preview

Preview Image

Thanks to @loup-brun

Installation

NPM

npm i swipejs

Yarn

yarn add swipejs

See the online example for a simple demo.

Import in your project

ES5

const Swipe = require('swipejs');

ES6 and newer

import Swipe from 'swipejs';

Markup

Swipe requires just a few lines of markup. Here is an example:

<div id="slider" class="swipe">
  <div class="swipe-wrap">
    <div></div>
    <div></div>
    <div></div>
  </div>
</div>

Above is the initial required structure– a series of elements wrapped in two containers. Place any content you want within the items. The containing div will need to be passed to the Swipe function like so:

Style

Swipe requires the following styles to be added to your stylesheet:

.swipe {
  overflow: hidden;
  visibility: hidden;
  position: relative;
}
.swipe-wrap {
  overflow: hidden;
  position: relative;
}
.swipe-wrap > div {
  float: left;
  width: 100%;
  position: relative;
  overflow: hidden;
}

Javascript

You may initialize a Swipe slider with only one line of javascript code:

window.mySwipe = new Swipe(document.getElementById('slider'));

I always place this at the bottom of the page, externally, to verify the page is ready.

Options

Swipe can take an optional second parameter – an object of key/value settings:

Options Type Default Description
startSlide Integer 0 index position at which Swipe should start.
speed Integer 300 speed of prev and next transitions in milliseconds.
auto Integer 0 when specified, start an auto-playing slideshow (time in milliseconds between slide change).
continuous Boolean true create an infinite feel with no endpoints.
autoRestart Boolean false auto restart slideshow after user's touch event or next/prev calls.
disableScroll Boolean false prevent any touch events on this container from scrolling the page.
stopPropagation Boolean false stop event propagation.
draggable Boolean false listen to mouse events in addition to the touch events
ignore String null ignore touch events on any element matching this selector
callback Function null runs at slide change. Three parameters are passed to the function: index (the current slide index)elem (the current slide element) and dir (direction: 1 for left or backward-1 for right or forward).
transitionEnd Function null runs at the end of a slide transition. Two parameters are passed to the function: index (the current slide index) and elem (the current slide element).

Example

window.mySwipe = new Swipe(document.getElementById('slider'), {
  startSlide: 0,
  speed: 400,
  auto: 3000,
  draggable: false,
  continuous: true,
  disableScroll: false,
  stopPropagation: false,
  ignore: ".scroller",
  callback: function(index, elem, dir) {},
  transitionEnd: function(index, elem) {}
});

API

A Swipe instance exposes the following public methods:

Methods Description
prev() slide to the previous slide.
next() slide to the next slide.
getPos() return the current slide index position.
getNumSlides() return the number of slides.
slide(index, duration) slide to the position matching the index (integer) (duration: speed of transition in milliseconds).
restart() restart the slideshow with autoplay.
stop() stop the slideshow and disable autoplay.
setup(options) reinitialize swipe with options.
disable() disable slideshow.
enable() enable slideshow.
kill() completely remove the Swipe instance.

Supports

Browser Support

Swipe is now compatible with all browsers, including IE7+. Swipe works best on devices that support CSS transforms and touch events, but can be used without these as well. A few helper methods determine touch and CSS transition support and choose the proper animation methods accordingly.

React Support

Please go to react swipe plugin, or check the example

Angular(V1) Support

Please go to angular swipe plugin for source code and usage example.

Who's using Swipe

Send me a note if you want your logo here

License

The MIT License (MIT).

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].