Custom components inside a st.expander

Hi all,

I have been testing examples provided in this repo and I have noted that if I use a custom component inside an expander I lose its current state. Am I missing something? Is it something related only to this example or is it an expected behavior?


with st.expander('Custom radio button VS Native radio button'):

    st.header('Custom radio button')
    custom_choice = custom_radio_button(
        label='pick one',
        options=['option 1', 'option 2', 'option 3'],
        default='option 2'
    st.header('Native radio button')
    choice =
        label='pick one', 
        options=['option 1', 'option 2', 'option 3'],

Example with streamlit 1.5.0 where I compare a native radio button and the custom one provided here: GitHub - streamlit/component-template: Templates and example code for creating Streamlit Components


1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.