Underneath, this is implemented via a Flexbox so all 8 buttons are going to be equidistant. You can play around with the size of containers with an array argument like st.beta_columns([2,1,2,1,2,1,2,1])
Hmmmm…this is a hard open question in which I am absolutely not a specialist, since I’m not a frontend developer nor a UX designer. So take my answer with a grain of salt.
Streamlit is designed to quickly let you build and deploy Data Science Web Apps using modern web technologies. It enables this by providing a framework, a modern layout (sidebar/content, horizontal layout and responsive design) and a set of widgets carefully designed and implemented for you with the latest web trends so you don’t have to care too much about it. For example st.beta_columns
uses Flexbox
underneath, a common concept in the web ecosystem that is used everywhere.
There is a lot of thought from their Product Managers, UX Designers and Developers poured into Streamlit about features, interactivity, layout, customization, scalability, accessibility and security (see this blog post for example) to make those web features easily accessible to Data Scientists in simple Python. I can see behind the closed doors of Streamlit as a Creator
So Streamlit layout and data model already integrate the “usual” best practices for presenting Data Science on the web (Streamlit is not alone on this terrain, e.g. Shiny has success on this front too). And given the success of apps on Streamlit Sharing platform, I can say that apps are shared to millions of person and get relatively good success, at least on Twitter/Linkedin .
- (if you really want advanced deployment features for millions of paying customers maybe you need to look at Streamlit for teams instead ? pm @randyzwitch if you need more info on this)
So yes, Streamlit gives you the well-known battle-tested web practices through a simple Python interface and if you have other ideas of layout, feel free to drop an issue on their Github, some widgets and layout ideas come from other users like st.file_uploader
, then the team will see how they can integrate it in a modern way.
NOW obviously:
you won’t be able to easily integrate the very latest ultra modern grid layout/accessibility keyboard options with Streamlit (it is possible through Streamlit components but those are mostly built by engineers like me who need to integrate a plugin in Streamlit and not validated by the dev team).
You won’t easily build crazy sleek looking interfaces with ultra simple and accessible design like the Stripe website or Financial Times COVID dashboards with super interactive graphs.
You won’t build a ecommerche platform with Streamlit (even if technically you could with a looooooot of work)
For all those use cases you’re better off learning the Javascript ecosystem
The aim is to let you build and showcase Data Science / Python libraries (I did a Pyspark lecture with Streamlit, or Spacy has got its own Streamlit demo!) on the web to millions of users. For that Streamlit does wonders