import streamlit as st form = st.form("my_form") form.slider("Inside the form") st.slider("Outside the form") # Now add a submit button to the form: form.form_submit_button("Submit")