I see this UX a lot, where there is a floating sidebar, that shows you where you are in the table-of-contents as you scroll through the page. This is a good example:
https://www.ycombinator.com/rfs/
I've occasionally found some libraries for this (e.g. in Semantic-UI), but what I'd really like is a lighter-weight approach, perhaps just with some vanilla javascript, so that I can continue using my site's assets/CSS/etc.
If important, my site uses ReactJS.
Any directions on how to best implement this? Many thanks!