Prevent component to be changed

Hello Guys. Is there any possible way to use custom components like a slider but prevent them to be changed? I mean, is there a way, like in web applications to show the field but in a way that the user canā€™t interact with them and just see the default / inputed value? Thanks!

Hi @martinelligor, welcome to the Streamlit community!

Not sure I understand the intent here. It seems like youā€™d be messing with your users to provide something that looks like an interactive widget, but that they couldnā€™t actually interact with. Note that you can set the default of a slider, so that upon load itā€™s already on the default value. Or you could put the slider inside of an expander, so that people donā€™t immediately think itā€™s something they should be messing with.

Best,
Randy

Hi @randyzwitch , thanks!

Actually, my component works a little different, sorry for put just a few description, here goes the description.

The user can edit this component when he is creating a configuration, but after this, I want to provide the same view of this creation screen but preventing the user to change the fields. I just wanted to preserve the user experience providing the same screen but just to look at the configuration that was made

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