Usage

Recognize a directional swipe.

tsx
// Recognize a directional swipe.
import { Box, fling, signal } from 'kuito';

const page = signal(0);

const swipe = fling({
  direction: ['left', 'right'],
  onEnd: (event, success) => {
    if (success) page.value += 1;
  },
});

<Box gestures={[swipe]} />;

Signatures

ts
(options?: FlingOptions): Gesture

Parameters

NameTypeRequiredDescription
optionsFlingOptionsNo—

Returns

Gesture

Generated from the public TypeScript declarations: signatures, props and defaults come from the checked source, descriptions from its JSDoc. No defaults are invented.