Spaces:
No application file

File size: 1,783 Bytes
8c57f17
efabd60
 
8c57f17
 
efabd60
8c57f17
efabd60
8c57f17
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
efabd60
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68

import streamlit as st

# App title
st.title("Streamlit User Interface Showcase")

# Sidebar for navigation
st.sidebar.header("Navigation")
page = st.sidebar.radio("Go to", ["Home", "Widgets", "Layouts"])

# Home Page
if page == "Home":
    st.header("Welcome to the Streamlit UI Showcase!")
    st.write("This app demonstrates the use of various Streamlit components.")
    st.image(
        "https://docs.streamlit.io/logo.png",
        caption="Streamlit makes building apps easy!",
        use_column_width=True,
    )

# Widgets Page
elif page == "Widgets":
    st.header("Widgets in Streamlit")

    st.subheader("Text Input")
    name = st.text_input("What's your name?")
    if name:
        st.write(f"Hello, {name}!")

    st.subheader("Slider")
    age = st.slider("How old are you?", 0, 100, 25)
    st.write(f"You are {age} years old.")

    st.subheader("Select Box")
    color = st.selectbox("What's your favorite color?", ["Red", "Blue", "Green"])
    st.write(f"Your favorite color is {color}.")

    st.subheader("Checkbox")
    agree = st.checkbox("I agree to the terms and conditions.")
    if agree:
        st.success("Thank you for agreeing!")

    st.subheader("Button")
    if st.button("Click me"):
        st.balloons()

# Layouts Page
elif page == "Layouts":
    st.header("Layouts in Streamlit")

    st.subheader("Columns")
    col1, col2, col3 = st.columns(3)
    col1.button("Column 1")
    col2.button("Column 2")
    col3.button("Column 3")

    st.subheader("Tabs")
    tab1, tab2 = st.tabs(["Tab 1", "Tab 2"])
    with tab1:
        st.write("This is Tab 1.")
    with tab2:
        st.write("This is Tab 2.")

    st.subheader("Expander")
    with st.expander("See more"):
        st.write("This is additional information inside an expander.")