Dropdown links in existing Header

I’m trying to achieve the same functionality of the header links with dropdown menus like in the Blizzard forums. I have seen used this to add header links but it doesn’t have the dropdown functionality:

There is also this component: Brand header theme component which can add the dropdown links but this adds a new menu above the current header which I do not want. I want to add header links to the existing header.

How can I do this? If can’t do this except by adding a new menu above the header, then can it collapse when scrolling like the Blizzard forum?