Hi Guys,
does anyone know if there’s a simple way to put specific button/text at the bottom of the sidebar while keeping the others in the flow (from top)?
Hi Guys,
does anyone know if there’s a simple way to put specific button/text at the bottom of the sidebar while keeping the others in the flow (from top)?
Hi @chris_klose,
Thank you for sharing with the Streamlit community!
If I understand your question correctly, you can control the order of the widgets in the sidebar by changing the order in which they are added to the sidebar. The first widget added will be at the top of the sidebar and the additional widgets will be below that top element.
Best,
Caroline
Hi @Caroline ,
i guss it was not well expressed. I am actually looking for a way to do this:
Meaning to put a new button into the red circled field. Something like:
with st.sidebar.header:
st.button()
with st.sidebar.footer:
st.button()
Hi @chris_klose,
Is there a reason you wouldn’t be able to add the st.button() line for the header before the lines which add the other sidebar widgets and the st.button() line for the footer after the lines which add the other sidebar widgets? Apologies if I am still misunderstanding.
Best,
Carolline
Hi @Venkatesh ,
intersting suggestion, yet it’s also not really at the bottom of the sidebar, is it?
Looks to me as if it’s just below the first beta_container.
Cheers
Chris
Yes, it’s not at the bottom. It will float next to the first container. If the first container has more elements then it will be at the bottom.
These cookies are necessary for the website to function and cannot be switched off. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms.
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us understand how visitors move around the site and which pages are most frequently visited.
These cookies are used to record your choices and settings, maintain your preferences over time and recognize you when you return to our website. These cookies help us to personalize our content for you and remember your preferences.
These cookies may be deployed to our site by our advertising partners to build a profile of your interest and provide you with content that is relevant to you, including showing you relevant ads on other websites.