How can we change the width of input text/select box?
The text/select box size will always be the entire column width what it is put in. If you would like it to be smaller, then what I like to do, is to create columns with the
st.beta_columns and put my widget in there.
This way you can make the width smaller.
Checkout this code for more:
import streamlit as st st.title("Change Text Input Width") st.write('A standard text input:') st.text_input('Write some text here:') st.write("text input in columns:") buff, col, buff2 = st.beta_columns([1,3,1]) col.text_input('smaller text window:')
Hope this helps!
Thanks for letting me know, But Melissa i was mistakenly mentioned about the width I was actually want to know about the height of the box, if you can please share at your earliest please
Well you can’t change the height of the
text_input, but you could use
text_area instead? It has a larger height and does basically the same thing!