# Haptic Feedback

{% hint style="info" %}

<pre data-overflow="wrap"><code>You'll need to import the javascript file in your website before starting from this <a data-footnote-ref href="#user-content-fn-1">link</a>.
</code></pre>

{% endhint %}

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

{% tabs %}
{% tab title="Plain JS" %}

```markup
const { haptics } = window.WTN

haptics.trigger({
    effect: 'Haptic Effect Type Described Below'
})

```

{% endtab %}

{% tab title="ES 6+" %}

```
import { trigger } from "webtonative/Haptics"

trigger({
    effect: 'Haptic Effect Type Described Below'
})

```

{% endtab %}
{% endtabs %}

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

[^1]: <https://docs.webtonative.com/javascript-apis/getting-started>
