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 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} />


React Hook Scroll

Add Comment