Create a Multi-Page App with the New Streamlit-Option-Menu Component

Still Use st.radio() to Create Menus? Time to Try Streamlit-Option-Menu with Complete Code Provided in Github

My Data Talk
CodeX

--

Image Created by Author

Introduction

Streamlit-option-menu is a new custom Streamlit component that allows users to toggle between options in a menu. Its functionality looks the same as Streamlit’s native st.selectbox() or st.radio() widget, but it is more aesthetically appealing and customizable with CSS styles. If you are still using st.radio() to create the navigation bar or menu for your app, it’s time to try this new component and see if it makes your app look nicer!

In this post, we’ll create a few simple apps and use streamlit-option-menu to show them all in one app. For each individual app, I have written a separate article about how to create it step-by-step. I’ll include links to those articles if you want to learn how each of the apps was created in detail. We will mainly be focused on how to use and customize the streamlit-option-menu component in this post.

Pre-requisite

To use the streamlit-option-menu component, you will need to first install it using the following command:

pip install streamlit-option-menu

--

--