How to dynamically add selectbox components each time a button is clicked?

I want to click on an โ€˜Addโ€™ button which would add a new selectbox component to the UI. e.g. if the user clicks on the โ€˜Addโ€™ button three times, three selectboxes need to be added and then I need to read the values of all three selectboxes in an array. How can I do this using Streamlit v1.27.0?

Hey @Kaustubh_Saxena ,

This article might help you. There are many ways of doing this. This is just my take on it.