Checklist
Summary
Add a stateful mode for st.button so each click toggles between on and off, with the button visually showing its current state and returning a boolean value.
Why?
This would support compact on/off actions that should look like buttons rather than switches, without requiring manual st.session_state handling.
How?
For example, add a toggle=True parameter to st.button, or introduce a dedicated st.toggle_button API.
Additional Context
st.toggle covers the switch-style UI; this request is for the same stateful behavior with a button-style appearance.
Checklist
Summary
Add a stateful mode for
st.buttonso each click toggles between on and off, with the button visually showing its current state and returning a boolean value.Why?
This would support compact on/off actions that should look like buttons rather than switches, without requiring manual
st.session_statehandling.How?
For example, add a
toggle=Trueparameter tost.button, or introduce a dedicatedst.toggle_buttonAPI.Additional Context
st.togglecovers the switch-style UI; this request is for the same stateful behavior with a button-style appearance.