is there a way in streamlit to create a button that is inline with text. which clicked on can call a function?
Please help
is there a way in streamlit to create a button that is inline with text. which clicked on can call a function?
Please help
Hi @Swaroop_Mg
You could count the number of clicks and store that data to the session state.
Hereβs a simple example code snippet:
import streamlit as st
st.title('Counter Example')
count = 0
increment = st.button('Increment')
if increment:
count += 1
st.write('Count = ', count)
More info in the Docs:
Hope this helps!
Thank you so much for the reply.
Im actually not looking for a counter, im looking for a button that looks like the screenshot i shared.
Im not sure if this is supported on streamlit or if itβs a JS / HTML functionality - it should allow me to place the button in between text/ inline with text.