Was surprised to see haptics work here haptics.lochie.me/ (github.com/lochie/web-haptics) on Safari iOS because Safari doesn't support `navigator.vibrate`.

An older project make it work too: Tactus tactus.aadee.xyz/ (github.com/aadeexyz/tactus)

Turns out it's a hidden `<input type="checkbox" switch>`. `switch` was added as part of Safari 17.4 webkit.org/blog/15054/an-html- (Feb 2024). It's the one that creates the haptic feedback.

WebHaptics simply toggles the switch at specific timing patterns ๐Ÿซจ

Screenshot of JavaScript code defining an exported object defaultPatterns with three notification patterns: success (ascending double-tap durations/intensities), warning (two taps with hesitation), and error (three rapid harsh taps), including numeric duration, delay, and intensity values.
0

If you have a fediverse account, you can quote this note from your own instance. Search https://mastodon.social/users/cheeaun/statuses/116164745188330452 on your instance and quote it. (Note that quoting is not supported in Mastodon.)