Input widgets
With widgets, Streamlit allows you to bake interactivity directly into your apps with buttons, sliders, text inputs, and more.
Button
Display a button widget.
python
clicked = st.button("Click me")
Download button
Display a download button widget.
python
st.download_button("Download file", file)
Checkbox
Display a checkbox widget.
python
selected = st.checkbox("I agree")
Radio
Display a radio button widget.
python
choice = st.radio("Pick one", ["cats", "dogs"])
Selectbox
Display a select widget.
python
choice = st.selectbox("Pick one", ["cats", "dogs"])
Multiselect
Display a multiselect widget. The multiselect widget starts as empty.
python
choices = st.multiselect("Buy", ["milk", "apples", "potatoes"])
Slider
Display a slider widget.
python
number = st.slider("Pick a number", 0, 100)
