TapOptions
Sets how many taps in a row a tap() gesture needs and how quick and still they must be, and its callbacks.
Utilisation
Type a shared gesture callback.
Ce type est utilisé par 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 })]} />;Déclaration du type
export interface TapOptions extends Common, Callbacks<TapEvent, TapEvent> {
/** Taps in a row: 2 for a double tap. */
count?: number;
maxDuration?: number;
maxDistance?: number;
}Membres 8
| Nom | Type | Requis | Description |
|---|---|---|---|
count | number | Non | Taps in a row: 2 for a double tap. |
maxDuration | number | Non | — |
maxDistance | number | Non | — |
disabled | boolean | Non | Ignores touches, like a disabled Pressable. |
hitArea | HitArea | Non | Insets of the area that takes touches: one for every edge, or by edge. |
onStart | (event: PositionEvent) => void | Non | It activated. |
onChange | (event: PositionEvent) => void | Non | It moved, with the change since the last move. |
onEnd | (event: PositionEvent, success: boolean) => void | Non | It ended after activating: success is false when it was cancelled. |
onStart — signatures de méthode
Signatures
(event: PositionEvent): voidParamètres
| Nom | Type | Requis | Description |
|---|---|---|---|
event | PositionEvent | Oui | — |
Retourne
void
onChange — signatures de méthode
Signatures
(event: PositionEvent): voidParamètres
| Nom | Type | Requis | Description |
|---|---|---|---|
event | PositionEvent | Oui | — |
Retourne
void
onEnd — signatures de méthode
Signatures
(event: PositionEvent, success: boolean): voidParamètres
| Nom | Type | Requis | Description |
|---|---|---|---|
event | PositionEvent | Oui | — |
success | boolean | Oui | — |
Retourne
void
Généré depuis les déclarations TypeScript publiques : signatures, props et valeurs par défaut viennent de la source vérifiée, les descriptions de sa JSDoc. Aucune valeur par défaut n'est inventée.