# Custom Components - Confused about properties

**URL:** <https://community.thunkable.com/t/custom-components-confused-about-properties/2943520>\
**Category:** Questions about Thunkable X\
**Tags:** help\
**Created:** [April 12, 2024, 8:06pm UTC](https://community.thunkable.com/t/custom-components-confused-about-properties/2943520 "2024-04-12T20:06:06Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![john\_shelby\_hhs](https://avatars.discourse-cdn.com/v4/letter/j/7feea3/32.png) [@john\_shelby\_hhs](https://community.thunkable.com/u/john_shelby_hhs)\
**Post date:** [April 12, 2024, 8:06pm UTC](https://community.thunkable.com/t/custom-components-confused-about-properties/2943520/1 "2024-04-12T20:06:06Z")

</div>

Hi Thunkable folks,  
I have started playing with the new-ish Custom Components features. There’s one thing that’s throwing me off:  
**Is there a way for a custom component to set its own property dynamically using blocks?**

I can:

- Set a property from an outside project that is using the component.
- React to a change in the property within the component.
- Set a “default value” for the property.

But when a property is added to a custom component, I’m only given a block for accessing the property, not one for setting it:  
 ![2024-04-12 13_04_07-Window](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/5/3/53de24e2f5164ea1620fba3d8b12ed8f02eb5ae1.png)

This means that properties can only be used for information going _into_ the component, they cannot be used for information _out of_ the component. That feels weird though, because lots of components have variables that we’d like to expose externally.

Without the option to internally set a property, it seems like the way to do this is to not use properties at all and instead to use methods for sending a value _into_ component and events for sending a value _out of_ component. That’s OK if it needs to be a very event-driven type of interaction, but it’d be nice if properties could be used to pass info both ways by basically just being regular variables that are exposed outside of the component.

Or maybe there is a way to set properties and I’m just really confused! In which case, help?

---

<div class="post-metadata">

**Author:** ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)\
**Post date:** [April 17, 2024, 9:03pm UTC](https://community.thunkable.com/t/custom-components-confused-about-properties/2943520/2 "2024-04-17T21:03:10Z")

</div>

Hello @john_shelby_hhs  
You can get the value from a custom component using an event with a parameter.  
Here is an example custom component using it: [Drop-down Custom Component - Tutorials and DIY Guides - Community (thunkable.com)](https://community.thunkable.com/t/drop-down-custom-component/2893382)

---

<div class="post-metadata">

**Author:** ![john\_shelby\_hhs](https://avatars.discourse-cdn.com/v4/letter/j/7feea3/32.png) [@john\_shelby\_hhs](https://community.thunkable.com/u/john_shelby_hhs)\
**Post date:** [April 22, 2024, 6:58pm UTC](https://community.thunkable.com/t/custom-components-confused-about-properties/2943520/3 "2024-04-22T18:58:49Z")

</div>

Yea, I see that. So maybe this is more of a feature suggestion. I just don’t see _why_ an event is the only way to extract variables.

Take your dropdown example:  
Sometimes I might want to perform an action when the user changes the dropdown selection. An event is great for that.

But sometimes I might want to _use the value selected_, but I want to do it when the user performs an action on a different component (like hitting a “submit” button). It seems like the way I’d have to do this is to make an app variable that mirrors a variable already in existence inside the custom component. Using your dropdown as an example, here’s how I need to code when I want to use the selection from a separate event:  
 ![2024-04-22 11_53_14-Window](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/5/0529dcf2539b511a9db9db9dccda50fe71bde62c.png)

When I would think it should be possible to do this (if there was an internally editable “selection” property):  
 ![2024-04-22 11_54_48-Window](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/c/d/cde29d8edf45dd9923a7cfa39ce106e65cac56a7.png)

Perhaps there are technological reasons why this isn’t possible, but it seems like it makes sense?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/f/0f59f292712368bce16ff80133ae10de8a6f27e8.png) [@system](https://community.thunkable.com/u/system)\
**Post date:** [July 21, 2024, 6:59pm UTC](https://community.thunkable.com/t/custom-components-confused-about-properties/2943520/4 "2024-07-21T18:59:33Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
