-
Notifications
You must be signed in to change notification settings - Fork 0
/
example.py
34 lines (25 loc) · 1.14 KB
/
example.py
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
import streamlit as st
import streamlit_sal as sal
from streamlit_sal import sal_stylesheet
with sal_stylesheet():
st.header('Example app for SAL')
st.subheader('Remember to run `streamlit-sal compile` before running this example app')
with sal.write():
st.write('This should be blue text')
with sal.container():
test = st.container()
test.text('Hello')
test.code('world')
with sal.metric():
st.metric("Temperature", "70 °F", "1.2 °F")
st.write('A styled button with pink border and color')
with sal.button():
st.button('Default SAL button')
st.write('A styled button with pink border and color. Has custom class button-large')
with sal.button('button-large'):
st.button('Custom large pink SAL button')
st.write('A styled button with pink border and color. Has custom class button-large AND button-disabled')
with sal.button('button-large', 'button-disabled'):
st.button('Custom large & disabled pink SAL button')
with st.sidebar:
st.write('The sidebar is on the right side due to move_sidebar_right=True in `with sal_stylesheet(..)`')