kitze / react-long

A LongPress component for React
86 stars 9 forks source link

🙋‍♂️ Made by @thekitze

Other projects:


react-long

Warning: works only on devices that support touch.

Demo

http://react-long.surge.sh

Example

<div>
  <LongPress
    time={1000}
    onLongPress={() => alert('pressed for 1s')}
    onPress={() => alert('pressed')}
  >
    <div>
      Hello world
    </div>
  </LongPress>
</div>