Skip to content

useVibrate ​

Category
Browser

Hook that provides vibrate api

typescript
import { useVibrate } from '@siberiacancode/reactuse';

Usage ​

typescript
const { supported, active, vibrate, stop, pause, resume } = useVibrate(1000);

Demo ​

Api ​

Parameters

NameTypeDefaultNote
options.patternUseVibratePattern-The pattern for vibration
options.interval?number0Time in milliseconds between vibrations

Contributors ​

Source • Demo