1.0.0-dev-102 • Published 2 years ago

react-haptic-button v1.0.0-dev-102

Weekly downloads
26
License
MIT
Repository
-
Last release
2 years ago

react-haptic-button

CircleCI

A React Button with Life (Haptic Feedback)

Enhance your User Experience with Haptic Feedback when you click the Button.*

*Currently available only on Android Devices. IOS is not supported. Check Browser Compatibility for more.

Features

  • Provides Haptic Feedback on supported devices
  • Backwards compatible on unsupported devices
  • Fully Customisable, Extend/Build to Suit
  • Support Styles
  • Support Classname

Installation

yarn add react-haptic-button

Usage

  import HapticButton from 'react-haptic-button';

  <HapticButton
    isHapticFeedbackEnabled={true}
    hapticFeedbackDuration={100}
    className="my-button-class"
    onClick={(e) => {/* Your Click Handler */}}
    type={'button'}
    style={{
      padding: '8px'
    }}
  >
  Confirm
  </HapticButton>

Props

propstypedefault valuedescription
isHapticFeedbackEnabledbooleantrueEnables/Disables the Haptic Feedback (Optional)
hapticFeedbackDurationnumber10Haptic Feedback Duration in ms (Optional)

All the other props passed to HapticButton are applied to the <button> internally.

Browser Compatibility

Haptic Feedback is available on Android Devices.

Browser Compatibility

1.0.0-dev-102

2 years ago

1.0.0-dev-94

2 years ago

1.0.0-dev-98

2 years ago

1.0.0-dev-90

3 years ago

1.0.0-dev-86

3 years ago

1.0.0-dev-82

3 years ago

1.0.0-dev-78

3 years ago

1.0.0-dev-74

3 years ago

1.0.0-dev-66

4 years ago

1.0.0-dev-70

4 years ago

1.0.0-dev-58

4 years ago

1.0.0-dev-62

4 years ago

1.0.0-dev-54

4 years ago

1.0.0-dev-50

4 years ago

1.0.0

5 years ago

1.0.0-dev-41

5 years ago

1.0.0-dev-37

5 years ago

0.0.1-dev-33

5 years ago

0.0.1-dev-29

5 years ago

0.0.1-dev-25

5 years ago

0.0.1-dev-22

5 years ago

0.0.1-dev-17

5 years ago

0.0.1-dev-13

5 years ago

0.0.1-dev-9

5 years ago

0.0.1-dev-5

5 years ago