
Security News
The Code You Didn't Write Is Still Yours to Defend
AI agents are pulling packages into environments no scanner is watching, creating exposure before security teams can see it.
nuxt-haptic
Advanced tools
Nuxt 4 module for mobile haptics, powered by web-haptics.
It wraps the browser Vibration API with a Nuxt-first DX:
useNuxtHaptics() auto-importv-nuxt-haptic directive for declarative interactions$nuxtHaptics injectionnpx nuxt module add nuxt-haptic
Or install manually:
bun add nuxt-haptic
export default defineNuxtConfig({
modules: ['nuxt-haptic'],
})
<script setup lang="ts">
const { success } = useNuxtHaptics()
</script>
<template>
<button v-nuxt-haptic="'selection'" type="button">
Tap
</button>
<button type="button" @click="success()">
Save
</button>
</template>
export default defineNuxtConfig({
modules: ['nuxt-haptic'],
nuxtHaptic: {
defaultPreset: 'selection',
enabled: true,
persistPreference: true,
preferenceStorageKey: 'nuxt-haptic:enabled',
touchOnly: true,
debug: false,
showSwitch: false,
},
})
defaultPreset accepts any web-haptics input, including built-in preset names, numbers, arrays, and custom pattern objects.
useNuxtHaptics()Returns:
trigger(input?, options?)selection()light()success()warning()error()cancel()enabledisSupportedsetEnabled(value)toggleEnabled()configIf you need types in userland:
import type { HapticInput, PresetName, TriggerOptions } from 'nuxt-haptic'
v-nuxt-hapticString shorthand:
<a v-nuxt-haptic="'selection'" href="/contact/">Contact</a>
Object form:
<button
v-nuxt-haptic="{ input: 'light', on: 'pointerdown', intensity: 0.7 }"
type="button"
>
Press
</button>
Directive fields:
input: any web-haptics inputon: click, pointerdown, or pointerupintensity: optional intensity overridetouchOnly: override module default per elementdisabled: disable haptics for that nodeweb-haptics falls back cleanly and can optionally emit debug audio.# Install dependencies
bun install
# Prepare stubs and types
bun run dev:prepare
# Run the playground
bun run dev
# Run tests
bun run test
bun run test:types
# Build the package
bun run prepack
web-haptics by Lochie Axon for the underlying haptics runtime.FAQs
Nuxt 4 module for mobile haptics powered by web-haptics.
The npm package nuxt-haptic receives a total of 0 weekly downloads. As such, nuxt-haptic popularity was classified as not popular.
We found that nuxt-haptic demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
AI agents are pulling packages into environments no scanner is watching, creating exposure before security teams can see it.

Security News
GitHub Actions checkout now blocks risky pull_request_target checkouts by default to help prevent pwn request supply chain attacks.

Product
Socket now supports Custom Roles and Repository Access Permissions so organizations can control who can access specific repositories and actions.