On click custom component

It’s definitely possible to add on_click handlers on custom components. There are a number of “clickable object” components that have been created by the community Streamlit Components - Community Tracker (for example Custom component to display clickable images), so you might look and see if any of the existing ones solve the problem you’re looking for.

If you don’t see what you’re looking for after looking around on the forum, then you could definitely create your own with an on_click parameter.

1 Like