All Projects → JakeSidSmith → React Fastclick

JakeSidSmith / React Fastclick

Licence: mit
Fast Touch Events for React

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to React Fastclick

Embla Carousel
A lightweight carousel library with fluid motion and great swipe precision.
Stars: ✭ 1,874 (+293.7%)
Mutual labels:  mobile, touch
Slider
Touch swipe image slider/slideshow/gallery/carousel/banner mobile responsive bootstrap
Stars: ✭ 2,046 (+329.83%)
Mutual labels:  mobile, touch
Interact.js
JavaScript drag and drop, resizing and multi-touch gestures with inertia and snapping for modern browsers (and also IE9+)
Stars: ✭ 10,561 (+2118.7%)
Mutual labels:  mobile, touch
React Easy Swipe
Easy handler for common swipe operations
Stars: ✭ 85 (-82.14%)
Mutual labels:  mobile, touch
Framework7
Full featured HTML framework for building iOS & Android apps
Stars: ✭ 16,560 (+3378.99%)
Mutual labels:  mobile, touch
Mars
腾讯移动 Web 前端知识库
Stars: ✭ 9,255 (+1844.33%)
Mutual labels:  mobile, touch
React Drag Drawer
A responsive mobile drawer that is draggable on mobile, and falls back to a modal on desktop
Stars: ✭ 135 (-71.64%)
Mutual labels:  mobile, touch
Vuetify Swipeout
👆 A swipe out example built with Vue CLI 3 + Vuetify + Swiper.
Stars: ✭ 117 (-75.42%)
Mutual labels:  mobile, touch
Cupertino Pane
🎉📱Multi-functional panes and boards for next generation progressive applications
Stars: ✭ 267 (-43.91%)
Mutual labels:  mobile, touch
Hover On Touch
A pure Javascript Plugin for an alternative hover function that works on mobile and desktop devices. It triggers a hover css class on »Taphold« and goes to a possible link on »Tap«. It works with all html elements.
Stars: ✭ 256 (-46.22%)
Mutual labels:  mobile, touch
Swiper
Most modern mobile touch slider with hardware accelerated transitions
Stars: ✭ 29,519 (+6101.47%)
Mutual labels:  mobile, touch
Vue Gallery
📷 Responsive and customizable image and video gallery, carousel and lightbox, optimized for both mobile and desktop web browsers.
Stars: ✭ 405 (-14.92%)
Mutual labels:  mobile, touch
Trip
移动前端开发经验指南
Stars: ✭ 550 (+15.55%)
Mutual labels:  mobile, touch
React Swipeable
React swipe event handler hook
Stars: ✭ 1,348 (+183.19%)
Mutual labels:  mobile, touch
Keen Slider
The HTML touch slider carousel with the most native feeling
Stars: ✭ 3,097 (+550.63%)
Mutual labels:  mobile, touch
Mobilefacenet V2
🔥improve the accuracy of mobilefacenet(insight face) reached 99.733 in the cfp-ff、 the 99.68+ in lfw,96.71+ in agedb30.🔥
Stars: ✭ 339 (-28.78%)
Mutual labels:  fast, mobile
Better Gesture
A gesture library use for pc, mobile, vue, and mini programs
Stars: ✭ 419 (-11.97%)
Mutual labels:  mobile, touch
React Native App Link
Easily link to other apps with React Native.
Stars: ✭ 449 (-5.67%)
Mutual labels:  mobile
Stayaway App
Official repository for the STAYAWAY COVID mobile application
Stars: ✭ 468 (-1.68%)
Mutual labels:  mobile
Awesome Test Automation
A curated list of awesome test automation frameworks, tools, libraries, and software for different programming languages. Sponsored by http://sdclabs.com
Stars: ✭ 4,712 (+889.92%)
Mutual labels:  mobile

React Fastclick CircleCI

Instantly make your desktop / hybrid apps more responsive on touch devices.

React Fastclick automatically adds fastclick touch events to elements with onClick attributes (and those that require special functionality, such as inputs) to prevent the delay that occurs on some touch devices.

Installation

Use npm to install react-fastclick

npm install react-fastclick

Usage

Initialize react-fastclick in your main javascript file before any of your components are created, and you're done.

Now any calls to onClick or elements with special functionality, such as inputs, will have fast touch events added automatically - no need to write any additional listeners.

ES6

import initReactFastclick from 'react-fastclick';
initReactFastclick();

ES5

var initReactFastclick = require('react-fastclick');
initReactFastclick();

Notes

  1. The event triggered on touch devices is a modified touchend event. This means that it may have some keys that are unusual for a click event.

In order to simulate a click as best as possible, this event is populated with the following keys / values. All positions are taken from the last know touch position.

{
  // Simulate left click
  button: 0,
  type: 'click',
  // Additional key to tell the difference between
  // a regular click and a fastclick
  fastclick: true,
  // From touch positions
  clientX,
  clientY,
  pageX,
  pageY,
  screenX,
  screenY
}
  1. On some devices the elements flicker after being touched. This can be prevented by setting the css property -webkit-tap-highlight-color to transparent. Either target html, body (to prevent the flickering on all elements) or target the specific element you don't want to flicker e.g. button.

    html, body {
      -webkit-tap-highlight-color: transparent;
    }
    

Support

React Fastclick 3.x.x has been tested with React 15, but should support older versions also.

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].