import { GestureDetector, GestureEvent } from 'fitbit-gestures'; // Get the element. You can also pass the element ID const element = document.getElementById('detectorElement'); const detector = new GestureDetector(element) .onTap((event: GestureEvent) => { //Do something }) .onDoubleTap((event: GestureEvent) => { //Do something }) .onLongPress((event: GestureEvent) => { //Do something }) .onSlide((event: GestureEvent) => { //Do something }) .onSwipe((event: GestureEvent) => { //Do something });