Framework entry points wrap a single TapticKit instance.
useTapticimport { useTaptic } from "taptickit/react";
function useTaptic(options?: TapticKitOptions): {
trigger: (input?: HapticInput, options?: TriggerOptions) => Promise<void> | undefined;
cancel: () => void;
isSupported: boolean;
};
useEffect and destroy() runs on unmount.debug and showSwitch update when the option values change.useTapticimport { useTaptic } from "taptickit/vue";
Same return shape as React. Instance is created in onMounted, destroyed in onUnmounted. Only debug is watched after mount.
createTapticimport { createTaptic } from "taptickit/svelte";
function createTaptic(options?: TapticKitOptions): {
trigger: (input?: HapticInput, options?: TriggerOptions) => Promise<void>;
cancel: () => void;
destroy: () => void;
setDebug: (debug: boolean) => void;
isSupported: boolean;
};
You are responsible for calling destroy() when the UI that owns the instance goes away (for example onDestroy in Svelte 4).