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
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Trigger haptic feedback using the unified MiniKit API.
MiniKit.sendHapticFeedback() to trigger native haptic feedback.
"notification" — style: "success", "warning", or "error""impact" — style: "light", "medium", or "heavy""selection-changed" — no style neededimport { 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);
}
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);
}
type MiniKitSendHapticFeedbackOptions =
| {
hapticsType: "notification";
style: "error" | "success" | "warning";
fallback?: () => unknown;
}
| {
hapticsType: "impact";
style: "light" | "medium" | "heavy";
fallback?: () => unknown;
}
| {
hapticsType: "selection-changed";
fallback?: () => unknown;
};
type SendHapticFeedbackResponse =
| {
executedWith: "minikit";
data: {
status: "success";
version: number;
timestamp: string;
};
}
| {
executedWith: "fallback";
data: unknown;
};
{
"executedWith": "minikit",
"data": {
"status": "success",
"version": 1,
"timestamp": "2026-03-28T18:24:00.000Z"
}
}
| Code | Meaning |
|---|---|
generic_error | Unexpected failure |
user_rejected | The request was rejected |
Was this page helpful?