haptics.selection
The tick of a picker or a segmented control changing value.
Usage
Add haptic feedback to a gesture.
// Add haptic feedback to a gesture.
import { Box, haptics, pan, type Callbacks, type PanChangeEvent, type PanEvent } from 'kuito';
// Shared feedback for every draggable in the app.
const feedback: Callbacks<PanEvent, PanChangeEvent> = {
onStart: () => void haptics.selection(),
onEnd: (_, success) => void (success && haptics.impact('light')),
};
<Box gestures={[pan({ axis: 'x', ...feedback })]} />;Signatures
(): Promise<void>Parameters
No parameters.
Returns
Promise<void>
Generated from the public TypeScript declarations: signatures, props and defaults come from the checked source, descriptions from its JSDoc. No defaults are invented.