> ## Documentation Index
> Fetch the complete documentation index at: https://docs.world.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Send Haptic Feedback

> Trigger haptic feedback using the unified MiniKit API.

Use `MiniKit.sendHapticFeedback()` to trigger native haptic feedback.

## Haptic Types

* **`"notification"`** — style: `"success"`, `"warning"`, or `"error"`
* **`"impact"`** — style: `"light"`, `"medium"`, or `"heavy"`
* **`"selection-changed"`** — no style needed

## Basic Usage

<CodeGroup>
  ```tsx title="Impact" theme={null}
  import { MiniKit } from "@worldcoin/minikit-js";
  import type { MiniKitSendHapticFeedbackOptions } from "@worldcoin/minikit-js/commands";

  export async function sendImpactHaptic() {
    await MiniKit.sendHapticFeedback({
      hapticsType: "impact",
      style: "medium",
    } satisfies MiniKitSendHapticFeedbackOptions);
  }
  ```

  ```tsx title="Selection Changed" theme={null}
  import { MiniKit } from "@worldcoin/minikit-js";
  import type { MiniKitSendHapticFeedbackOptions } from "@worldcoin/minikit-js/commands";

  export async function sendSelectionHaptic() {
    await MiniKit.sendHapticFeedback({
      hapticsType: "selection-changed",
    } satisfies MiniKitSendHapticFeedbackOptions);
  }
  ```

  ```ts title="Type" theme={null}
  type MiniKitSendHapticFeedbackOptions =
    | {
        hapticsType: "notification";
        style: "error" | "success" | "warning";
        fallback?: () => unknown;
      }
    | {
        hapticsType: "impact";
        style: "light" | "medium" | "heavy";
        fallback?: () => unknown;
      }
    | {
        hapticsType: "selection-changed";
        fallback?: () => unknown;
      };
  ```
</CodeGroup>

## Result

<CodeGroup>
  ```ts title="Type" theme={null}
  type SendHapticFeedbackResponse =
    | {
        executedWith: "minikit";
        data: {
          status: "success";
          version: number;
          timestamp: string;
        };
      }
    | {
        executedWith: "fallback";
        data: unknown;
      };
  ```

  ```json title="Example" theme={null}
  {
    "executedWith": "minikit",
    "data": {
      "status": "success",
      "version": 1,
      "timestamp": "2026-03-28T18:24:00.000Z"
    }
  }
  ```
</CodeGroup>

## Fallback Behavior

Define a custom fallback in the command payload for support outside mini apps.

## Error Codes

| Code            | Meaning                  |
| --------------- | ------------------------ |
| `generic_error` | Unexpected failure       |
| `user_rejected` | The request was rejected |
