Clickable Input Widget

Hi Community,

I am a new user to Streamlit and thus quite unfamiliar with it’s all available functionality.

I was wondering how can we create a clickable input widget where if I click the text description part of the widget, it pops up with a box with texts and images (for explaining what that input means for user).

Best regards,

Hi @DebayanPaul93, welcome to the forum! I’d recommend checking out the documents about all of the input widgets available in streamlit Input widgets - Streamlit Docs

If you’re looking for a widget that doesn’t seem to be available in native streamlit, you can check out this post to see the components that people in the community have made for streamlit. Streamlit Components - Community Tracker

There is no easy way, in Streamlit yo use the help argument for that.

Hi @Goyo, help argument can suffice my need. I checked the documentation, but couldn’t find how I can make a user input mandatory for a widget (radio, number input etc.) or at least indicate for the user to provide it.

I don’t understand what you want. An input widget always has a value, if the value is fine for the user they don’t need to change it. If the value is not appropriate for the application you can show an error message.

Hi @Goyo , currently those widgets have a default value for each of them. However, what I am looking for is to somehow to tell the user to at least click/type a value (even if they click the default) so they don’t skip it.

As an example, these widgets all have some default value but I want to ensure user to click on the widget at least so it can be confirmed that they didn’t miss it

You can assign invalid default values.


I was in a similar scenario and I’m just sharing how I dealt with it. I tackled it in two ways using Streamlit Forms:
a. I made an if loop which passes when all inputs are filled else shows error.
b. With a similar wrapper as in a. I seperated the checkbox part into a seperate container outside which displays once the initial form is filled.