streamlit-on-Hover-tabs (for custom navigation bar)

So I decided to create my own custom navigation bar with CSS. But needed a custom navigation component (navigation tabs). Took a while, but I finally got there. More work needs to be done but its my first time using typescript so please bare with me.

Details for the project can be located here

Firstly, you’d need to download the style.css file into your directory and load it as in the example in the github page above (see readme). Then import the component and you are good to go. I recently updated streamlit and noticed a change in the css, just one, that was related to the navigation bar (the stHeader) but have added this to the style css file. This is the main problem, as streamlit updates, changes to the navigation bar are to be expected but they can be easily adjusted with CSS.

Anyway, thanks streamlit, and enjoy everyone!



I have now implemented custom CSS to adjust tabs for your own custom navigation. I borrowed the CSS implementation from the wonderful Victoryhb’s option menu.

So… make your own nav bar using the CSS file (style) and build your own tabs to accommodate it.


And yet another beautiful custom navigation sidebar :heart_eyes:

Don’t forget to add it to the Components Tracker so we don’t lose track of it!

Have a nice day :balloon:

1 Like

Thanks, added!

This component is really great

1 Like

Glad you like it!


Implemented custom CSS, see original post for more details.

Try and just get this error:

TypeError: on_hover_tabs() got an unexpected keyword argument ‘name’

Apologies, I forgot to update the readme file. It should be ‘tabName’ not ‘name’ as the input variable.


  • Support for mobile/smaller screens has been added. Just update the style.css file.