👽 Add Vertical Space
Submitted by Tyler Richards
Summary
Add n lines of vertical space to your Streamlit app in one command
Functions
add_vertical_space
Add vertical space to your Streamlit app.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
num_lines |
int
|
Height of the vertical space (given in number of lines). Defaults to 1. |
1
|
Source code in src/streamlit_extras/add_vertical_space/__init__.py
Import:
- You should add this to the top of your .py file
Examples
example
def example():
add_n_lines = st.slider("Add n vertical lines below this", 1, 20, 5)
add_vertical_space(add_n_lines)
st.write("Here is text after the nth line!")