TapTickit Docs

Vue

Import useTaptic from taptickit/vue. The composable creates a TapticKit on mount and destroys it on unmount.

Basic usage

<script setup lang="ts">
import { useTaptic } from "taptickit/vue";

const { trigger, cancel, isSupported } = useTaptic();
</script>

<template>
  <button type="button" @click="trigger('heavy')">Heavy tap</button>
</template>

Options

useTaptic(options?) accepts TapticKitOptions:

  • debug — Desktop-style audio / timing feedback.
  • showSwitch — Shows the built-in DOM control.

The initial options object is passed into the TapticKit constructor on mount. Changes to debug are watched and applied via setDebug. Other fields (such as showSwitch) are not re-read after mount unless you remount the component.

Returns

PropertyTypeDescription
trigger(input?, options?) => Promise<void> | undefinedTapticKit.trigger
cancel() => voidTapticKit.cancel
isSupportedbooleanTapticKit.isSupported