st.bottom
st.bottom is a layout container pinned to the bottom of the main app area. Use it for chat inputs, toolbars, footers, and other controls that should stay visible while users scroll through your app content.
Elements can be passed to st.bottom using object notation and with notation.
The following two snippets are equivalent:
Important
st.bottom is only available in the main app area. Using it inside st.sidebar, st.dialog, or event containers (such as st.toast) raises an error.
Keep chat input at the bottom
st.chat_input behaves differently depending on where you call it in your script. At the base level of your app (the main area, not inside another container), the chat input appears at the bottom of the app automatically.
If you call st.chat_input inside a container, it renders inline in that container instead. For example, st.expander("Settings").chat_input(...) places the input inside the expander, not at the bottom of the viewport.
Use st.bottom to force the chat input to the bottom in those cases:
Add a sticky footer
Use st.bottom for footers, toolbars, or status bars that should remain visible at the bottom of the viewport:
Still have questions?
Our forums are full of helpful information and Streamlit experts.
