
Security News
npm v12 Ships With Install Scripts Off by Default, Begins Deprecating 2FA-Bypass Tokens
npm v12 is generally available, turning install scripts off by default and beginning the deprecation of 2FA-bypass publishing tokens.
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 19 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
npm v12 is generally available, turning install scripts off by default and beginning the deprecation of 2FA-bypass publishing tokens.

Research
/Security News
Socket tracks the activity as Operation “Muck and Load”: a threat actor uses commit-farming workflows, public dead drops, and protected archives to stage Windows RAT and infostealer malware.

Security News
pnpm 11.10 hardens registry auth to block token redirection, tightens pack-app and deploy, and makes the Rust port (v12) installable.