Spaces:
Running
Running
File size: 855 Bytes
9a7b741 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
import streamlit as st
@st.dialog("This is a dialog")
def dialog_function():
st.write("This is a dialog function.")
if st.button("Close"):
st.rerun(scope="app")
st.header("Layout elements")
a, b, c, d = st.tabs(["Tab A", "Tab B", "Tab C", "Tab D"])
with a:
st.write("This is the content of Tab A.")
with b:
st.write("This is the content of Tab B.")
with c:
st.write("This is the content of Tab C.")
with d:
st.write("This is the content of Tab D.")
st.subheader("Columns")
col0, col1, col2 = st.columns(3, border=True)
col0.write("This is the first column.")
col1.write("This is the second column.")
col2.write("This is the third column.")
st.expander("Expander").write("This is an expander")
col0, col1 = st.columns(2)
col0.popover("Popover").write("This is a popover")
if col1.button("Dialog"):
dialog_function()
|