Possibilities and actions of new HTML element

Hello! I have a question about new HTML element for building custom web-site content. I have already found the information about triggering events using HTML code: data-click-target="primary". However, I also want to know about other possibilities of this element.

Is it possible to use tag and functions for this HTML element?
Is it possible to hide the element or using id="button1"?

The code example is below:

<!DOCTYPE html>
<html lang="en-US">

<head>
<script>
  function myFunction() {
    html1.hidden = true
}
</script>

</head>
<body >

<img id="button1" src="photo" data-click-target="primary">

<button onclick="myFunction()" data-click-target="primary">Click me</button>

</body>
</html>

Thank you!

Hello @Willow_Graznow!

Could you give me some more details on what you are trying to build? Also by tag do you mean HTML components?

If you want to have an element or image that is hidden or displayed on a button click there is a much easier way to do so with our components :sweat_smile:

Check Retool's Component Library before you start to build a custom component to see if any existing components are suitable. If your component serves a common use case, consider submitting a feature request to Retool!

At Retool we highly recommend using our drag-and-drop components instead of building out custom HTML components unless it is completely necessary to build something completely unique for a use case that isn't covered by anything in our component library.

Let me know what else I can do to help you find the right components and setting up event handling behavior!