Usage

Expand a small gesture target.

tsx
// Expand a small gesture target.
import { Symbol, tap, type HitArea } from 'kuito';

// A 24-point icon that takes touches over 44 points, as the platforms advise.
const comfortable: HitArea = { horizontal: 10, vertical: 10 };

<Symbol
  name="xmark"
  size={24}
  gestures={[tap({ hitArea: comfortable, onEnd: () => console.log('close') })]}
/>;

Type declaration

ts
export type HitArea =
  | number
  | Partial<
      Record<
        'left' | 'top' | 'right' | 'bottom' | 'width' | 'height' | 'horizontal' | 'vertical',
        number
      >
    >;

Type

ts
number | Partial<Record<"width" | "height" | "top" | "right" | "bottom" | "left" | "horizontal" | "vertical", number>>
Generated from the public TypeScript declarations: signatures, props and defaults come from the checked source, descriptions from its JSDoc. No defaults are invented.