跳转到内容
Tauri

@tauri-apps/plugin-haptics

此内容尚不支持你的语言。

type ImpactFeedbackStyle:
| "light"
| "medium"
| "heavy"
| "soft"
| "rigid";

Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/haptics/guest-js/bindings.ts#L76


type NotificationFeedbackType: "success" | "warning" | "error";

Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/haptics/guest-js/bindings.ts#L82

function impactFeedback(style): Promise<Result<null, never>>
ParameterType
styleImpactFeedbackStyle

Promise<Result<null, never>>

Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/haptics/guest-js/index.ts#L11


function notificationFeedback(type): Promise<Result<null, never>>
ParameterType
typeNotificationFeedbackType

Promise<Result<null, never>>

Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/haptics/guest-js/index.ts#L12


function selectionFeedback(): Promise<Result<null, never>>

Promise<Result<null, never>>

Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/haptics/guest-js/index.ts#L13


function vibrate(duration): Promise<Result<null, never>>
ParameterType
durationnumber

Promise<Result<null, never>>

Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/haptics/guest-js/index.ts#L10


© 2025 Tauri Contributors. CC-BY / MIT