0.2.0 • Published 3 months ago
react-hook-scroll v0.2.0
React-Hook-Scroll ·
React-Hook-Scroll" is a scroll UI library that can be used in React projects. It is designed to be compatible with both desktop and mobile environments.
Install
npm i react-hook-scroll
Example
1. VirtualScroll
import { useState } from "react";
import { VirtualScroll } from "react-hook-scroll";
function App() {
const [selected, setSelected] = useState(null);
return (
<>
<VirtualScroll list={[1, 2, 3, 4, 5]} onItemSelected={setSelected} />
</>
);
}
The VirtualScroll component requires two required profiles.
- list: need a list to let the user choose.
- onItemSelected: The action to be taken with the item selected by the user is required.
2. ScrollToTop
import { ScrollToTop } from "react-hook-scroll";
return (
<>
<ScrollToTop>
<SVG />
</ScrollToTop>
</>
);
Contributing
Development happens in the open on GitHub and we are grateful for contributions including bug fixes, improvements, and ideas.
License
React-Hook-Scroll is MIT licensed.
0.1.15
3 months ago
0.2.0
3 months ago
0.1.16
3 months ago
0.1.17
3 months ago
0.1.18
3 months ago
0.1.19
3 months ago
0.1.14
4 months ago
0.1.13
4 months ago
0.1.10
4 months ago
0.1.11
4 months ago
0.1.12
4 months ago
0.1.9
4 months ago
0.1.8
4 months ago
0.1.7
4 months ago
0.1.2
4 months ago
0.1.1
4 months ago
0.1.4
4 months ago
0.1.3
4 months ago
0.1.6
4 months ago
0.1.5
4 months ago
0.1.0
4 months ago