Horizontal Layout adds a few new tools to Streamlit to make it easier for you to lay out your app! Here's what's coming:
st.beta_container
: A single block that permits multiple Streamlit elementsst.beta_columns
: Lay out multiple containers of the same width, side-by-sidewith column1: st.write("hi!")
: Syntax sugar to specify where an element should gost.beta_expander
: Expand/collapse widget, wrapping a single container(BTW, more layout features will be coming to Streamlit — this is just the first phase!)
pip install
the nightly build[OPTIONAL] Set up Pipenv, so that you don't overwrite your normal Streamlit installation
$ pip install pipenv
$ pipenv shell
Get the latest nightly build
$ pip install streamlit-nightly
Run Streamlit with the new features!
$ streamlit run my_app.py
# Here's an example you can use:
$ streamlit run <https://raw.githubusercontent.com/akrolsmir/married-dinosaurs/master/app.py>
streamlit-nightly
to your requirements.txt
Create a requirements.txt
file in your S4A repo, if it does not exist
In the requirements.txt
, add a line with the version of streamlit-nightly
used. Make sure the version is 0.67.1.dev20200921
or higher
Sample requirements.txt
streamlit-nightly >= 0.67.1.dev20200921
Push your repo to Github, and add it in S4A!
Sample directory structure
your-s4a-repo/
streamlit_app.py
requirements.txt