V
V
Vadim Stepanenko2021-04-18 00:45:52
React
Vadim Stepanenko, 2021-04-18 00:45:52

React js library to track scroll position and scroll to element?

Hey! I came across a lib for react, but right now I can’t find it in any way.

The bottom line is:
There are several sections that go under each other. And there is a menu on top. If the scroll is on the first section, then this is detected and the first item in the menu is highlighted. Further, when scrolling up to 3 blocks, the 3rd item is highlighted in the menu.

And if you click on a menu item, the page will automatically scroll to this section.

It I described a case of use of this . Maybe someone faced similar?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
iBird Rose, 2021-04-18
@Vadim1899

google for "scrollspy"
https://www.npmjs.com/package/react-scrollspy
https://www.npmjs.com/package/react-scrollspy-nav

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question