Nav bar drop down title reflect current section of page

Creating a topic, due to not finding a solution in the forums.

I’d like to recreate the sub-nav behavior of the Twitter help pages:

(From what I can tell the behavior is only visible on a mobile device. Inspect in desktop web will not work).

As you scroll down the page, the sub-nav dropdown title is updated according to the name of the current section. Clicking the dropdown opens a list menu where the current section is labeled.

I’d like to recreate this behavior in Webflow. Can someone help? I expect some custom code, etc.