Support matrix
Calls to
haptic() on unsupported devices are safely no-ops — no errors are thrown and nothing breaks.Feature detection
UsesupportsHaptics to check for support before rendering haptic-related UI. This avoids showing UI hints on devices that will never fire a haptic.
supportsHaptics is true on any touchscreen device (iOS or Android) and false everywhere else, including SSR.