For the complete documentation index, see llms.txt. This page is also available as Markdown.

Device.triggerHaptic

함수형 API generateHapticFeedback으로도 같은 기능을 쓸 수 있어요.

기능 설명

디바이스에 햅틱 진동을 일으켜요. 버튼 터치나 화면 전환에 피드백을 줄 때 사용할 수 있어요. type이 필수예요.

타입

Device.triggerHaptic(options: HapticFeedbackOptions): Promise<void>;

Params

type HapticFeedbackType =
  | "tickWeak"
  | "tap"
  | "tickMedium"
  | "softMedium"
  | "basicWeak"
  | "basicMedium"
  | "success"
  | "error"
  | "wiggle"
  | "confetti";

type HapticFeedbackOptions = {
  type: HapticFeedbackType;
};

Response

없음.

예시 코드

도움이 되었나요?