Choose A Value Through Scrolling – React Hook Scroll

React-Hook-Scroll is a UI library that allows users to choose a value through scrolling in React apps. Compatible with both mobile and desktop.

How to use it:

1. Install and import the react-hook-scroll.

# NPM
$ npm install react-hook-scroll
import { useState } from "react";
import { VirtualScroll } from "react-hook-scroll";

2. Create a number picker.

function App() {
  const [selected, setSelected] = useState(null);
  return (
    <div className="App">
      <VirtualScroll list={[1, 2, 3, 4, 5]} onItemSelected={setSelected} />
    </div>
  );
}

Preview:

React Hook Scroll

Download Details:

Author: imb96

Live Demo: View The Demo

Download Link: Download The Source Code

Official Website: https://github.com/imb96/react-hook-scroll

License: MIT

Add Comment