A React Button with Life (Haptic Feedback)
npm install react-haptic-button
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.
- Provides Haptic Feedback on supported devices
- Backwards compatible on unsupported devices
- Fully Customisable, Extend/Build to Suit
- Support Styles
- Support Classname
``sh`
yarn add react-haptic-button
`js
import HapticButton from 'react-haptic-button';
hapticFeedbackDuration={100}
className="my-button-class"
onClick={(e) => {/ Your Click Handler /}}
type={'button'}
style={{
padding: '8px'
}}
>
Confirm
`
props | type | default value | description
--------------------------|----------------------|---------------|------------
isHapticFeedbackEnabled | boolean | true | Enables/Disables the Haptic Feedback (Optional)hapticFeedbackDuration | number | 10 | Haptic Feedback Duration in ms (Optional)
All the other props passed to HapticButton are applied to the
Haptic Feedback is available on Android Devices.