You could do it with JavaScript in a ui template node.
Using JQuery to attach a click event is $(".selector").on("click", function() {...})
where .selector is the thing you want clickable and ... is the code to run.
The ui_template node has built in help on how to send from dashboard to node-red. But to point you in the right direction, you call scope.send( { payload: "some value" } );
Here are some Search Terms to help you find additional help on the forum
Click works with: <a class="md-toolbar-tools" ng-click="send({payload: 'true'})"></a>
but only when the ui_template is inside a Group, not when added to the <head> section. Adding it to a group misplaces it from its top right corner.
I tried some combinations inside <script> as above but couldn't get it to work.
<script>
(function(scope) {
const _scope = scope;
$(".md-toolbar-tools").on("click", function() {
_scope.send( { payload: "true" } )
});
//hide this card. NOTE: a960b1e5.8aec is the Node id as seen in the INFO panel on the sidebar
$('[node-id="a960b1e5.8aec"]').hide();
});
})(scope);
</script>