Hydralit Navbar - Custom Streamlit Component Responsive Navbar

Thanks, appreciate it. I am curious though as to what you mean by the code req to implement? The ability to configure any part of the menu will always mean more code, in this case more items in a single Python dictionary. I’m not sure how much less code to create a navbar would be acceptable.

For example, if you just want a navbar with 5 items, it is this tiny amount of code, including the package import statement.

import hydralit_components as hc

menu_data = [
    {'label':"Left End"},
    {'label':"Book"},
    {'label':"Component"},
    {'label':"Dashboard"},
    {'label':"Right End"},
]

menu_id = hc.nav_bar(menu_definition=menu_data)

st.info(f"{menu_id=}")

That piece of code with nothing else, generates this,

1 Like