Streamlit tutorial: How to dynamically adjust the height of the text area?
P粉007288593
2023-09-04 17:34:31
<p>In my scenario I have two st.columns with two textareas. One for user input and another for generated text. </p>
<p>Is it possible to make the text area expand with each line and remove the scroll bars in the text area? </p>
<p>While testing, I can only use scrollbars, and I know you can use st.markdown to insert HTML, but I don't know how to call textareas and how to edit these to adjust the height dynamically. </p>
You need to write a small script to do this job. Please see the following code: