Flarum (2.x)
    Preparing search index...
    • Trigger a haptic feedback pattern on supported mobile devices.

      Parameters

      • pattern: HapticInput = 'light'

        A HapticPreset name, a duration in ms, or a custom vibration pattern array.

      Returns void

      haptic('light');        // gentle tap — toggles, selections
      haptic('medium'); // moderate tap — confirmations
      haptic('heavy'); // strong tap — destructive actions
      haptic('success'); // double tap — positive actions (e.g. likes)
      haptic('warning'); // double pulse — caution
      haptic('error'); // triple pulse — validation errors
      haptic('nudge'); // long + short — attention, reminders
      haptic(50);             // single vibration, 50ms
      haptic([100, 50, 100]); // vibrate 100ms, pause 50ms, vibrate 100ms