swipe-direction

    1.0.2 • Public • Published

    Note

    This package is for use in mobile devices that works with touch screen (web mobile). The package permit identify the direction swipe

    How to use

    Install: npm install swipe-direction

    Usage: . . .

    import useSwipeDetector from "swipe-direction";
    
    const SwapContainer = () => {
      const [moveTo, events] = useSwipeDetector();
      return (
        <div className="grid">
          <div {...events} className="box-detector">
            <h1 className="text"> {moveTo} </h1>
          </div>
        </div>
      );
    };

    this code show a element where you can do swipe and it show to the direction on screen

    Install

    npm i swipe-direction

    DownloadsWeekly Downloads

    4

    Version

    1.0.2

    License

    MIT

    Unpacked Size

    3.38 kB

    Total Files

    4

    Last publish

    Collaborators

    • tzehc