# Click action on SVG shape only but not entire component

**URL:** <https://forum.inductiveautomation.com/t/click-action-on-svg-shape-only-but-not-entire-component/108362>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [July 11, 2025, 11:29am UTC](https://forum.inductiveautomation.com/t/click-action-on-svg-shape-only-but-not-entire-component/108362 "2025-07-11T11:29:15Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![Felipe\_CRM](https://avatars.discourse-cdn.com/v4/letter/f/dfb087/32.png) [@Felipe\_CRM](https://forum.inductiveautomation.com/u/Felipe_CRM)\
**Post date:** [July 11, 2025, 12:46pm UTC](https://forum.inductiveautomation.com/t/click-action-on-svg-shape-only-but-not-entire-component/108362/6 "2025-07-11T12:46:42Z")

</div>

> [@Custom button styling and click events with CSS/SVG](https://forum.inductiveautomation.com/t/custom-button-styling-and-click-events-with-css-svg/98107/4):
>
> I did make a module too, but i also made a simpler js injected version. If i remember correctly, it catches the most specific name property of the svg elements and writes it to a view.custom prop. where you can handle your "onclick" event in the onchange of this property. Not the id property as asked, so you will have to add all of those, limitation by perspective sadly.

Victor made a JS injection that will let you know the name of the SVG element that was clicked, might work here.

---

_[View the full topic](https://forum.inductiveautomation.com/t/click-action-on-svg-shape-only-but-not-entire-component/108362)._
