Vibration

Vibration is described as a pattern of on-off pulses, which may be of varying lengths.

The vibration pattern may consist of either a single integer, describing the number of milliseconds to vibrate, or an array of integers describing a pattern of vibrations and pauses. Vibration is controlled with a single method: Vibration.vibrate().

import { Vibration } from 'react-native';

API

Static methods

cancel () => void

Stop the vibration

vibrate (number | Array<number>) => void

Start the vibration pattern

Updated
Edit
React Native for WebCopyright © Nicolas Gallagher and Meta Platforms, Inc.