Long text, need to adjust width

Currently, when text is long, it choose to use a horizontal scroll bar which is very weird. While using text_area the text would behavior much better except that I don’t really need the area for typing text.

import streamlit

string = "TEXT BOX IS NOT WIDE ENOUGH " * 10
streamlit.text(string)

streamlit.text_area(string)

Hey @noklam and welcome to the community :blush:,

If I understand correctly, you are saying that a script like the one below results in annoying horizontal scrolling inside the text widget:


st.text_input("Enter some text", "long " * 30 + "text")

…and to solve this I assume you would like to make the text widget grow vertically as needed, as you add more text.

Is this correct?

That’s an interesting feature request, but it’s not very high on our priority list at this time. That said, if someone from the community is reading this and would like to implement this behavior, please contact us! This would be a perfect first contribution, given its very clear scope :smiley:

2 Likes