# Perspective: Display property on label component not working

**URL:** <https://forum.inductiveautomation.com/t/perspective-display-property-on-label-component-not-working/42210>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [January 13, 2021, 4:59pm UTC](https://forum.inductiveautomation.com/t/perspective-display-property-on-label-component-not-working/42210 "2021-01-13T16:59:42Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![msella](https://avatars.discourse-cdn.com/v4/letter/m/df705f/32.png) [@msella](https://forum.inductiveautomation.com/u/msella)\
**Post date:** [January 13, 2021, 4:59pm UTC](https://forum.inductiveautomation.com/t/perspective-display-property-on-label-component-not-working/42210/1 "2021-01-13T16:59:42Z")

</div>

I added a display property to a label component, and when I changed the property value to ‘none’, no change occurred.

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/b/4/b456b16d6c7841cb6a1f4b6598562362d68c614a.png)

The display property works on the markdown component as well as a flex container with the label inside it. Is there a way to use the display property within a label component directly? I am using version 8.1.0.

---

<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:** [January 13, 2021, 5:28pm UTC](https://forum.inductiveautomation.com/t/perspective-display-property-on-label-component-not-working/42210/2 "2021-01-13T17:28:42Z")

</div>

Why are you manually setting the `display` property in style configuration? There should be an equivalent property in the `position` section of the component’s configuration (if using a flex-based container).

---

<div class="post-metadata">

**Author:** ![msella](https://avatars.discourse-cdn.com/v4/letter/m/df705f/32.png) [@msella](https://forum.inductiveautomation.com/u/msella)\
**Post date:** [January 13, 2021, 6:09pm UTC](https://forum.inductiveautomation.com/t/perspective-display-property-on-label-component-not-working/42210/3 "2021-01-13T18:09:29Z")

</div>

My goal is to bind the `display` property to the selected valued of a dropdown component. If option 1 was selected, the user would be able to see the label and button (see image below).

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/b/3/b3a7fef7e973d952f31711c6246909c8eb2a8d61.png)

If option 2 was selected, the label and button would not show.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/d/e/de60515725f5e63d5a882c0e202933de62dbcdea.png)

I would use the `visibility` property, but the components below the toggled components would be spaced out when I would actually want them to collapse. Currently the `display` property bind seems to only work on the button component (using the property in the style configuration).

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/b/8/b84ae8146ab774f2b39a19fedc0e883cde90968b.png)

---

<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:** [January 13, 2021, 6:11pm UTC](https://forum.inductiveautomation.com/t/perspective-display-property-on-label-component-not-working/42210/4 "2021-01-13T18:11:15Z")

</div>

`position.display = false` will emit `display: none` in the component’s CSS and thus ‘collapse’ it in the layout - that’s exactly what the `display` position prop was added to do.

---

<div class="post-metadata">

**Author:** ![msella](https://avatars.discourse-cdn.com/v4/letter/m/df705f/32.png) [@msella](https://forum.inductiveautomation.com/u/msella)\
**Post date:** [January 13, 2021, 6:28pm UTC](https://forum.inductiveautomation.com/t/perspective-display-property-on-label-component-not-working/42210/5 "2021-01-13T18:28:23Z")

</div>

I apologize - I have my label component in a column container which I believe is why the `display` property is not working. I see the `position.display` property for a label component if I’m wrapped in a flex component, though not if I am in a column container. Is there a workaround to toggle `display` directly for a label component in a non-flex container, or do I have to have it wrapped?

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [January 13, 2021, 6:33pm UTC](https://forum.inductiveautomation.com/t/perspective-display-property-on-label-component-not-working/42210/6 "2021-01-13T18:33:38Z")

</div>

> [@msella](#):
>
> Is there a workaround to toggle `display` directly for a label component in a non-flex container, or do I have to have it wrapped?

`meta.visible` should be set to `false` if you're in a Column Container. If your concern here is that this doesn't result in the components "collapsing", then you need to look into using nested containers. A Column container will not collapse like you're looking for.
