Parameters
The action to perform when the gesture is recognized.
Gesture configuration.
Adds a tap gesture recognizer to this view.
.onTapGesture(action: (locationInView: Point) => void): Component;
.onTapGesture(props: { count: number }, action: (locationInView: Point) => void): Component;
Show properties
Button("Tap me", () => {})
.onTapGesture((location) => {
console.log("Tapped at", location)
})
Image("photo.jpg")
.onTapGesture({ count: 2 }, (location) => {
console.log("Double tapped")
})
Text("Triple tap me")
.onTapGesture({ count: 3 }, () => {
console.log("Triple tapped!")
})