# How to change the property of a component from the frontend code

**URL:** <https://forum.inductiveautomation.com/t/how-to-change-the-property-of-a-component-from-the-frontend-code/90469>\
**Category:** Module Development\
**Tags:** perspective\
**Created:** [May 16, 2024, 2:16am UTC](https://forum.inductiveautomation.com/t/how-to-change-the-property-of-a-component-from-the-frontend-code/90469 "2024-05-16T02:16:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Phillip\_Wu](https://avatars.discourse-cdn.com/v4/letter/p/f4b2a3/32.png) [@Phillip\_Wu](https://forum.inductiveautomation.com/u/Phillip_Wu)\
**Post date:** [May 16, 2024, 2:16am UTC](https://forum.inductiveautomation.com/t/how-to-change-the-property-of-a-component-from-the-frontend-code/90469/1 "2024-05-16T02:16:42Z")

</div>

I am making a custom component similar to the built-in multistate button but with some extra visual. I need to determine which button has been clicked so that the onClick script will work properly. The built-in multistate button does this by changing the controlValue. I want to know how that is done so that I can implement the same behaviour.

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [May 16, 2024, 6:21am UTC](https://forum.inductiveautomation.com/t/how-to-change-the-property-of-a-component-from-the-frontend-code/90469/2 "2024-05-16T06:21:20Z")

</div>

> [@How to update custom component props in the designer](https://forum.inductiveautomation.com/t/how-to-update-custom-component-props-in-the-designer/85391/3):
>
> If you really need to write it manually, then you should have access to an implicit props that contains a reference to the ComponentStore, which itself contains a reference to the component's props, meta, custom as PropertyTree objects with a write method, e.g: this.props.store.props.write("path", value); However, the input fields in Perspective are a fair bit more complicated than just simple \<Input\> wrappers since they need to handle theming across browsers, the "defer updates" settings, and…
