Ability to add custom items to hamburger menu
See original GitHub issueRelated issue: https://github.com/streamlit/streamlit/issues/395
Some users would like to add items to the hamburger menu. To support this we’d have to think more deeply about the API for that. For example, would something like this be good enough for real-world use:
clicked_menu_item = st.menu_items(['Item 1', 'Item 2', 'Item 3'])
if clicked_menu_item == 'Item 1':
do_stuff()
elif clicked_menu_item == 'Item 1':
etc etc
What this would do: it would add “Item 1”, “Item 2”, and “Item 3” at the top of the hamburger menu, followed by a separator. All items that Streamlit puts in there would go below the separator.
(And if we implement the ability to [hide the menu](Related thread: https://discuss.streamlit.io/t/how-do-i-hide-remove-the-menu-in-production/362/3), when hidden only the Streamlit items would disappear.)
Community voting on feature requests enables the Streamlit team to understand which features are most important to our users.
If you’d like the Streamlit team to prioritize this feature request, please use the 👍 (thumbs up emoji) reaction in response to the initial post.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:21
- Comments:5 (1 by maintainers)
Top GitHub Comments
When you develop the api, layout and formatting of this please consider if the hamburger menu is enough. I would like to be able to make a menu at the top and fixed as well.
Just like these guys 😃
So maybe some options like
would be cool. And if the there is not enough space on the screen to expand then it should not expand.
Hi, any news on this? In particular, I’m interested in just hiding the menu. Maybe I could explore the code a bit to provide a PR, but I’m not sure about how do you guys would prefer to implement this