If you’re creating a debugging post, please include the following info:
Are you running your app locally or is it deployed? LOCAL
Share the Streamlit and Python versions. Python 3.11, Streamlit 1.30
How does one move the button so it is side by side with the chat input down below? I’ve tried as many HTML hacks as I can think of including inline-flex or flex.
I’ve tried using st.columns, but the issue is getting it to stay at the bottom. One of the requirements is that as the chat_messages are added, it will continue to push the page down. The input + button must stay at the bottom each time and scroll with the page.
The button I am talking about is the purple button with a giant + sign. I can give a code example.
Basically, I want to emulate the natural behavior of chat_input when it is not in a container. If it is not in a container, it sits at the bottom of the screen. I want to pair a button with it. But when I pair a button with it, it overrides the chat_inputs behavior to sit at the bottom.
Any attempts to move it to the bottom results in a “fixed” position where other elements overlap with it.
Yeah, it is very tricky to get this to work. I’ve been trying all sorts of CSS and HTML hacks. The issue is st.chat_input creates a bottom container that is sectioned from the main app. It also adds the data-testid=“ScrollToBottomContainer” tag to the section element that has the chat.
Effectively, it is extremely difficult to pair other elements with the chat_input at the bottom of the screen. Perhaps modifying the st.empty method so that it accepts a parameter to be at the bottom of the screen? I am not sure the best way to go around this.
Thanks for stopping by! We use cookies to help us understand how you interact with our website.
By clicking “Accept all”, you consent to our use of cookies. For more information, please see our privacy policy.
Cookie settings
Strictly necessary cookies
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.
Performance cookies
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.
Functional cookies
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.
Targeting cookies
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.