it’s been a while since my last interaction with Streamlit, I was wondering about radiobuttons:
- is it possible to enter Image next to name for radiobutton option? (image attached).
For example, I would use instead options ‘Radio’ something like: ‘Radio’ st.image(image), or just st.image
st.radio(label = 'R1', options = ['Radio' st.image, st.image, 'R3','4'])
While I didn’t find direct solution; I am using replacements and having 2 columns (radio button in one, image next to it in another column) which accomplishes what I wanted.
I tried implementing the same however I failed. Could you kindly elaborate on how was this achieved?
Hi @sakshams1990 ,
As mentioned, I did not find direct solution of what I wanted - but found a better solution for my original idea.
I ended up having multiple columns: col1 has Button; col2 has graph; col3 has graph and col4 has Button. So, col1 Button control graph on col2; col4 Button controls graph on col3.
See e.g. Page ‘Extract colors from colormap’ in my App Color Extractor:
You can find full code on my GitHub:
See file functions.py and def
create_main_columns(origin, cmap_color_span, num_of_swatches): as well as items connected to it.