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 an interactive image viewer component that responds to both tap and swipe gestures. The viewer should display an image and provide different feedback based on how the user interacts with it.
When the user taps (quick touch/click) on the image:
When the user swipes left or right on the image:
Create a React component called ImageViewer that accepts the following props:
interface ImageData {
url: string;
title: string;
description: string;
}
interface ImageViewerProps {
images: ImageData[];
initialIndex?: number;
}The component should:
@generates
import React from 'react';
interface ImageData {
url: string;
title: string;
description: string;
}
interface ImageViewerProps {
images: ImageData[];
initialIndex?: number;
}
export const ImageViewer: React.FC<ImageViewerProps>;Provides touch and swipe gesture handling for React components.
@satisfied-by
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