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.


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