TapOptions
Sets how many taps in a row a tap() gesture needs and how quick and still they must be, and its callbacks.
Verwendung
Type a shared gesture callback.
Dieser Typ wird verwendet von tap
// Type a shared gesture callback.
import { Box, pan, tap, type GestureEvent } from 'kuito';
// Any gesture's event carries how many fingers it involves.
const logFingers = (event: GestureEvent) => console.log(`${event.numberOfPointers} finger(s)`);
<Box gestures={[tap({ onEnd: logFingers }), pan({ onStart: logFingers })]} />;Typdeklaration
export interface TapOptions extends Common, Callbacks<TapEvent, TapEvent> {
/** Taps in a row: 2 for a double tap. */
count?: number;
maxDuration?: number;
maxDistance?: number;
}Mitglieder 8
| Name | Typ | Erforderlich | Beschreibung |
|---|---|---|---|
count | number | Nein | Taps in a row: 2 for a double tap. |
maxDuration | number | Nein | — |
maxDistance | number | Nein | — |
disabled | boolean | Nein | Ignores touches, like a disabled Pressable. |
hitArea | HitArea | Nein | Insets of the area that takes touches: one for every edge, or by edge. |
onStart | (event: PositionEvent) => void | Nein | It activated. |
onChange | (event: PositionEvent) => void | Nein | It moved, with the change since the last move. |
onEnd | (event: PositionEvent, success: boolean) => void | Nein | It ended after activating: success is false when it was cancelled. |
onStart — Methodensignaturen
Signaturen
(event: PositionEvent): voidParameter
| Name | Typ | Erforderlich | Beschreibung |
|---|---|---|---|
event | PositionEvent | Ja | — |
Rückgabe
void
onChange — Methodensignaturen
Signaturen
(event: PositionEvent): voidParameter
| Name | Typ | Erforderlich | Beschreibung |
|---|---|---|---|
event | PositionEvent | Ja | — |
Rückgabe
void
onEnd — Methodensignaturen
Signaturen
(event: PositionEvent, success: boolean): voidParameter
| Name | Typ | Erforderlich | Beschreibung |
|---|---|---|---|
event | PositionEvent | Ja | — |
success | boolean | Ja | — |
Rückgabe
void
Generiert aus den öffentlichen TypeScript-Deklarationen: Signaturen, Props und Standardwerte stammen aus der geprüften Quelle, Beschreibungen aus deren JSDoc. Kein Standardwert ist erfunden.