Links

Haptic Feedback

You'll need to import the javascript file in your website before starting from this link.
This module enables you to trigger Haptics Feedback using predefined vibration patterns shared by all apps, thus helping users understand that various types of feedback carry special significance
Plain JS
ES 6+
const { haptics } = window.WTN
haptics.trigger({
effect: 'Haptic Effect Type Described Below'
})
import haptics from "webtonative/Haptics"
haptics.trigger({
effect: 'Haptic Effect Type Described Below'
})
Different Effects Are as followed
  • impactLight
  • impactMedium
  • impactHeavy
  • notificationSuccess
  • notificationWarning
  • notificationError
Note: effect argument is optional. if you don't provide anything in effect/wrong value is provided then default effect will be generated