Vibration

The Vibration API is a powerful tool that allows web developers to enhance user experience on mobile devices by enabling vibration functionality. This API provides a means for web applications to programmatically trigger vibrations, thereby making web interactions more tactile and engaging.

<button
    {{ stimulus_controller("@pwa/vibration") }}
    {{ stimulus_action("@pwa/vibration", "vibrate", parameters={pattern: [300, 300, 300, 300, 300, 900, 900, 300, 900, 300, 900, 900, 300, 300, 300, 300, 300]}) }}
>
SOS
</button>