GitHub

Source

useSwipe

Simple implementation to detect horizontal swipe actions. Accepts callbacks for on right and left swipes.

Import

import { useSwipe } from "@livekit/components-react";

Usage

<div
onTouchStart={onTouchStart}
onTouchMove={onTouchMove}
onTouchEnd={onTouchEnd}
>

Properties

elementReact.RefObject<HTMLElement>
options?UseSwipeOptions

Returns

void