question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Allow non-widget-like elements to become clickable.

See original GitHub issue

Problem

Currently in Streamlit there is no way to register clicks on non-widget-like user interface elements like text and images.

It would be cool if ALL Streamlit elements could be made to generate an event to trigger a callback when they are clicked on.

Solution

MVP: A new option in non-widget-like elements – perhaps on_click=callback_function

Additional context

https://discuss.streamlit.io/t/register-click-events-on-images/1893


Community voting on feature requests enables the Streamlit team to understand which features are most important to our users.

If you’d like the Streamlit team to prioritize this feature request, please use the 👍 (thumbs up emoji) reaction in response to the initial post.

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:16
  • Comments:7

github_iconTop GitHub Comments

5reactions
pietzcommented, Feb 11, 2020

In addition to this one should probably think about a visual feedback that comes with this trigger.

  • Is there a default animation?
  • Is it temporary (will fade out) or will it stay?
  • Is there a way to change the visual feedback?

Just a few thoughts 😃

2reactions
vivien000commented, Mar 21, 2022

st-click-detector and st-clickable-images can be used as workarounds for this feature.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Python selenium: wait until element is clickable - not working
Correct syntax for explicit wait in python is : element = WebDriverWait(driver, 20).until( EC.presence_of_element_located((By.
Read more >
Register click events (on images)
Is there a way to register a click on an image that is displayed in the main section? ... Allow non-widget-like elements to...
Read more >
Beyond Blue Links: Making Clickable Elements ...
Whether you adopt a flat-design style or not, interactive components must retain sufficient cues to suggest clickability.
Read more >
How To Deal With "Element is not clickable at point” ...
These locators help you perform any type of web element interactions using Selenium. Identifying the elements may be an easy task, but your ......
Read more >
How to Fix Selenium's "Element Is Not Clickable at Point"
Another example is when the web application wants you to accept ... In such cases, if you try to click on the element,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found