HitArea
Grows or shrinks the area that takes a gesture's touches beyond the view's bounds, so a small target stays easy to hit.
Usage
Expand a small gesture target.
// 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
export type HitArea =
| number
| Partial<
Record<
'left' | 'top' | 'right' | 'bottom' | 'width' | 'height' | 'horizontal' | 'vertical',
number
>
>;Type
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.