Gestures
Frame-locked touch handling on the main thread — Pressable, Draggable and Swipeable components plus composable useTap / usePan / usePinch / useSwipe hooks.
Installation
pnpm add @sigx/lynx-gestures
Components
import { Pressable, Swipeable } from '@sigx/lynx-gestures';
<Swipeable onSwipeLeft={archive} onSwipeRight={remove}>
<Pressable onPress={open}>
<Text>Swipe or tap me</Text>
</Pressable>
</Swipeable>
Hooks
Gesture handlers run as worklets on the main thread — touch tracking never waits on the background thread, so dragging stays locked to the frame rate.
import { usePan } from '@sigx/lynx-gestures';
import { useSharedValue } from '@sigx/lynx';
const x = useSharedValue(0);
const pan = usePan((e) => { x.value = e.translationX; });
Composition
Combine recognizers with useGesture — simultaneous, exclusive or sequenced:
const gesture = useGesture([pinch, pan], { simultaneous: true });
Next steps
Pair with Motion for spring-driven follow-through, or see the API reference.
