Scroll / navigate to header within the same page

Hi all,

Currently I am create a side bar with allows users to navigate to specific parts of the page.

Basically the page should scroll to the header when clicked. E.g pressing test3 will navigate to header test3 contents.
I have tried dcc.Link(“test3”, href=“#test3”), but it is not working.

Any help will be appreciated.

Hello @murphyhl and welcome to the forum!

Using html.A(“Click this to go to test3”, href"#test3") will create link that scrollst to component with id=“test3” in a layout. It has to be some other component, for example some div.

1 Like

Hi @martin2097 !

Thank you for the swift reply. It works now.

1 Like