React hook for handling swipe gestures on touch devices and mouse interactions with comprehensive directional callbacks and customizable sensitivity settings
90
Evaluation — 90%
↑ 1.00xAgent success when using this tile
Build a React component that displays visual feedback during swipe gestures, with special handling for the start of each swipe gesture.
Create a SwipeBox component that:
The component should track and display:
@generates
import React from 'react';
/**
* A component that visualizes swipe gestures with special handling for the first event.
*
* Displays:
* - Current swipe displacement (deltaX, deltaY)
* - Initial touch position
* - Visual indicator for the first event in each swipe sequence
* - Color changes based on swipe state
*/
export function SwipeBox(): React.JSX.Element;Provides the React framework for building the component.
Provides swipe gesture detection and event handling capabilities.
Install with Tessl CLI
npx tessl i tessl/npm-react-swipeabledocs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10