> For the complete documentation index, see [llms.txt](https://docs.webtonative.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.webtonative.com/javascript-apis/haptic-feedback-1.md).

# 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>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.webtonative.com/javascript-apis/haptic-feedback-1.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
