Vibration

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

TV relevance: Baseline React Native Web API, but typically not useful on smart TV browser runtimes. Most TV targets (including common Tizen/webOS browser environments) do not provide practical vibration support.

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
React Native Web for TVPortions Copyright © Nicolas Gallagher, Meta Platforms, Inc., Facebook, Inc. and affiliates, and other contributors as noted in file headers and THIRD_PARTY_NOTICES.md. Modifications and TV extensions Copyright © Harpreet Singh and contributors.