While Streamlit’s components are quite pretty, I find that they are incredibly wasteful with screen space, compared to, say, R shiny or Tableau dashboards. For example, components like selectbox have huge font sizes and there is a lot of white space everywhere.
This creates a usability problem in applications like BI or interactive visualization, where you want to give power users many options to tweak without scrolling away from the main visualization. Tabs and expanders offer some relief, but they limit what you can have on the screen at one time.
I get that you shouldn’t overload your user interfaces. However, in my opinion, this argument does not apply to applications for power users, who want maximum information with minimum distraction. Look at BI dashboards, software used by finance pros, or just tools based on Excel spreadsheets – very high density, but that’s what those users want and need. At least the users I’m trying to convince of using Streamlit apps instead of Excel sheets.
So, I’m wondering whether anyone has tried to tweak Streamlit to be a bit more compact?
Are there any official roadmap plans in that direction?
Anybody else struggling with this?
Here are some thoughts:
I think that the new-ish options to omit labels, as well as radio’s horizontal options are good steps in that direction.
An option for a smaller font in selectbox, multiselect, and elsewhere could be a low-hanging fruit.
It would be nice to get rid of this enormous whitespace at the top of every app.
Thanks for taking the time to give us some thoughts and suggestions, greatly appreciated. I’ll make sure to forward this to our product managers.
Speaking of the roadmap, it is publicly available at https://roadmap.streamlit.app/ and you’ll be glad to see that “Visual Customization” is in the roadmap as well. For a high-level overview of the Streamlit roadmap also check out the following blog:
In the mean time, all layout of a Streamlit app can be customized by adjusting the CSS. I made a video on how to do so in the video below (code in the video description):
Hey @DCBB! For whitespace at the top of the app, we have a GitHub issue here, please feel free to upvote that and leave additional comments if you like. Might also make sense to open another issue on compact layout in general. I don’t think we have one as far as I’m aware. We usually try to have feature requests on GitHub so a) others can upvote them and b) they don’t get lost among the thousands of other forum posts. Thanks for your input!!
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.
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.
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.
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.