File size: 1,484 Bytes
f5e40dc
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
import streamlit as st

st.title('Unit 5. Layouts & Containers')
st.caption('์ฐธ์กฐ์‚ฌ์ดํŠธ: https://docs.streamlit.io/library/api-reference/layout')

# sidebar- with ์‚ฌ์šฉํ•˜๊ธฐ ๐Ÿ“ง  ๐Ÿ“ฑ  ๐Ÿ“ž
with st.sidebar:
    st.header('1. Sidebar')

add_selectbox = st.sidebar.selectbox('์–ด๋–ป๊ฒŒ ์—ฐ๋ฝ๋“œ๋ฆด๊นŒ์š”?',
                                    ('Email', 'Mobile', 'Ofice Phone')
                                    )
if add_selectbox == 'Email':
    st.sidebar.title('๐Ÿ“ง')
elif add_selectbox == 'Mobile':
    st.sidebar.title('๐Ÿ“ฑ')
elif add_selectbox == 'Ofice Phone':
    st.sidebar.title('๐Ÿ“ž')


# columns  
Cat = 'https://images.pexels.com/photos/2071873/pexels-photo-2071873.jpeg?auto=compress&cs=tinysrgb'
Dog = 'https://images.pexels.com/photos/3361739/pexels-photo-3361739.jpeg?auto=compress&cs=tinysrgb'
Owl = 'https://images.pexels.com/photos/3737300/pexels-photo-3737300.jpeg?auto=compress&cs=tinysrgb'

st.header('2. Columns')
col1, col2, col3 = st.columns(3)

with col1:
    st.text('Cat')
    st.image(Cat)
with col2:
    st.text('Dog')
    st.image(Dog)
with col3:
    st.text('Owl')
    st.image(Owl)    
 
    
# # tabs - width=200
st.header('3. Tabs')
tab1, tab2, tab3 = st.tabs(['Cat', 'Dog', 'Owl'])

with tab1:
    st.text('Cat')
    st.image(Cat, caption='This is a cat', width=300)
with tab2:
    st.text('Dog')
    st.image(Dog, caption='This is a dog', width=300)
with tab3:
    st.text('Owl')
    st.image(Owl, caption='This is an owl', width=300)