FlingEvent
Where a fling started, in the view and on screen, for reacting to the swipe that triggered it.
Usage
Read where a flick started.
// Read where a flick started.
import { Box, fling, signal, type FlingEvent } from 'kuito';
const dismissed = signal<'top' | 'bottom' | null>(null);
// A fling started near the top dismisses upward, else downward.
const dismiss = (event: FlingEvent) => {
dismissed.value = event.y < 100 ? 'top' : 'bottom';
};
<Box gestures={[fling({ direction: ['up', 'down'], onStart: dismiss })]} height={200} />;Type declaration
export type FlingEvent = PositionEvent;Members 7
| Name | Type | Required | Description |
|---|---|---|---|
x | number | Yes | — |
y | number | Yes | — |
absoluteX | number | Yes | — |
absoluteY | number | Yes | — |
state | number | Yes | — |
numberOfPointers | number | Yes | — |
pointerType | number | Yes | — |
Generated from the public TypeScript declarations: signatures, props and defaults come from the checked source, descriptions from its JSDoc. No defaults are invented.