# Component expose local variable

**URL:** <https://community.weweb.io/t/component-expose-local-variable/7886>\
**Category:** How do I?\
**Tags:** components\
**Created:** [April 1, 2024, 8:36pm UTC](https://community.weweb.io/t/component-expose-local-variable/7886 "2024-04-01T20:36:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![asanzjones](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/asanzjones/32/8641_2.png) [@asanzjones](https://community.weweb.io/u/asanzjones)\
**Post date:** [April 1, 2024, 8:36pm UTC](https://community.weweb.io/t/component-expose-local-variable/7886/1 "2024-04-01T20:36:01Z")

</div>

Hello!

I am trying to figure out how the component local variables can be exposed outside the component.  
I expected to be able to see the variable exposed on every instance of the component once exposed, like seeing and being able to affect it on an instance workflow, but I do not see the variable outside the component.

Is there something I am doing wrong or missing?

Thanks,  
Arturo

 ![Screenshot 2024-04-01 at 10.29.10 PM](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/b/bb137a694d6f335e3a343f84a14293e06369fb53.png)  
 ![Screenshot 2024-04-01 at 10.30.24 PM](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/b/bd78eabccff776ffcefcfc03a50327be522312d5.png)

---

<div class="post-metadata">

**Author:** ![Broberto](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/broberto/32/5918_2.png) [@Broberto](https://community.weweb.io/u/Broberto)\
**Post date:** [April 1, 2024, 9:45pm UTC](https://community.weweb.io/t/component-expose-local-variable/7886/2 "2024-04-01T21:45:04Z")

</div>

Seems like you can only read them from outside, you could try to change them with JS, but I’m not sure how that would go. Your best bet would be to set a workflow that you will be calling that will reset/change the value.

Seems to work on object as a variable, but I’m not sure about other data types.

 ![Screenshot 2024-04-01 at 23.45.44](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/b/b87e9359723bf6c81560d5dd61edbd2a53a00e17.jpeg)

---

<div class="post-metadata">

**Author:** ![saulo260](https://avatars.discourse-cdn.com/v4/letter/s/47e85d/32.png) [@saulo260](https://community.weweb.io/u/saulo260)\
**Post date:** [May 29, 2025, 6:52pm UTC](https://community.weweb.io/t/component-expose-local-variable/7886/3 "2025-05-29T18:52:59Z")

</div>

[@weweb-team](https://community.weweb.io/groups/weweb-team) up
