Hey Community ,
We’re excited to announce a new media format called Streamlit Shorts - these will be a series of short (~90 seconds or less) YouTube videos that are designed to make developing, designing and most importantly, learning about Streamlit easy.
The goal is to create a series of videos that will allow new (and experienced!) users of Streamlit a new way to learn (or remember) how to use, create and debug some of the most common Streamlit functions. We know that people have many different learning styles, and we hope this will help those visual and interactive learners out there!
The first series is on Streamlit’s core functions and the first short on the button!
Check it out below:
import streamlit as st st.title("Making a Button") result = st.button('Click Here') st.write(result) if result: st.write(":smile:")
The second video of the series goes into how to make a checkbox:
import streamlit as st st.title("Making a Checkbox") check = st.checkbox("Click here") st.write('State of the checkbox:', check) if check: st.write(":smile:"*12) check_2 = st.checkbox("Uncheck to remove cake", value=True) st.write("State of 2nd checkbox", check_2) if check_2: st.write(":cake:"*102)
The third video of the series goes into how to make a set of radio buttons:
import streamlit as st st.title("Make a Radio Button") page_names = ['Checkbox', 'Button'] page = st.radio('Navigation', page_names, index=1) st.write("**The variable 'page' returns:**", page) if page == 'Checkbox': st.subheader('Welcome to the Checkbox page!') st.write("Nice to see you! :wave:") else: st.subheader("Welcome to the Button page!") st.write(":thumbsup:")
The fourth video of the series goes into how to make a slider:
import streamlit as st st.title(“Streamlit Sliders”) st.subheader(“Slider 1:“) x = st.slider(‘A number between 0-100’, value=50) # defaults to 0-100 st.write(“Slider number:“, x) st.subheader(“Slider 2:“) y = st.slider(‘Choose between 0-1 by 0.1’, min_value=0.0, max_value=1.0, step=0.1) st.write(“Slider number:“, y)
Have functionality or a question you’d like to see covered in a short? Let us know below