How to increase the width of web page

Ask the community or our support engineers for answers to questions.
I use the beta columns function to put 5 number_input components in one row:
Then it turn out that the width of number_input is too narrow, only 1 digit can be shown.

is there a way to increase the width of row ( you can see there is a lot of space in width) or disable the step button(+/-) in the number_input component?

Hey @fanraul,

You can set your Streamlit app to use wide mode with st.set_page_config(layout="wide").

It needs to be the first streamlit call you make (i.e. first thing you do after importing streamlit). This will allow you to make use of the whole screen.

Happy Streamlit-ing!

Hi @Marisa_Smith,

Is this the same as the code snippet that was circulated earlier called max_width() to make the browser window wide?


Hey @ddutt,

Im not sure to what code snippet your referring (I have only been at streamlit for 6 weeks! :grin: :partying_face:) but here is wide mode in action:

import streamlit as st 



Without the wide mode the above code looks like:

And with it:

@Marisa_Smith, roughly the same effect. I prefer your approach as its native streamlit.


1 Like

it works. Thanks everyone.


1 Like