# Creating a multi-state indicator in perspective

**URL:** <https://forum.inductiveautomation.com/t/creating-a-multi-state-indicator-in-perspective/47894>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [June 17, 2021, 2:33pm UTC](https://forum.inductiveautomation.com/t/creating-a-multi-state-indicator-in-perspective/47894 "2021-06-17T14:33:25Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![guy](https://avatars.discourse-cdn.com/v4/letter/g/9e8a1a/32.png) [@guy](https://forum.inductiveautomation.com/u/guy)\
**Post date:** [June 17, 2021, 2:33pm UTC](https://forum.inductiveautomation.com/t/creating-a-multi-state-indicator-in-perspective/47894/1 "2021-06-17T14:33:25Z")

</div>

I am looking to create a multi state indicator that changes background color and font color depending on a state value. I have created a custom property called state and binded it to the tag where I get my integer from 0-4. I have different styles I want to display depending on that integer value. How can I bind styles to the props.styles.classes property, and make it change style class depending on the state value? I just started working with perspective yesterday, so any help would be greatly appreciated. Thanks.

---

<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:** [June 17, 2021, 2:40pm UTC](https://forum.inductiveautomation.com/t/creating-a-multi-state-indicator-in-perspective/47894/2 "2021-06-17T14:40:55Z")

</div>

There’s lots of ways to do this. For a simple 1 value → 1 style, you can bind `style.classes` to a property binding (to the value) with a transform on it.  
If you use an expression transform, you can use a `case` statement:  
[https://docs.inductiveautomation.com/display/DOC81/case](https://docs.inductiveautomation.com/display/DOC81/case)  
Or you could use a Map transform, which has some nice helpful UI for setup:

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

---

<div class="post-metadata">

**Author:** ![guy](https://avatars.discourse-cdn.com/v4/letter/g/9e8a1a/32.png) [@guy](https://forum.inductiveautomation.com/u/guy)\
**Post date:** [June 17, 2021, 6:12pm UTC](https://forum.inductiveautomation.com/t/creating-a-multi-state-indicator-in-perspective/47894/3 "2021-06-17T18:12:32Z")

</div>

Thank you so much for the quick response. I’m just starting to learn perspective and will make use of this forum for questions!

---

<div class="post-metadata">

**Author:** ![manjuyadav95.m](https://avatars.discourse-cdn.com/v4/letter/m/9fc348/32.png) [@manjuyadav95.m](https://forum.inductiveautomation.com/u/manjuyadav95.m)\
**Post date:** [November 1, 2021, 11:36am UTC](https://forum.inductiveautomation.com/t/creating-a-multi-state-indicator-in-perspective/47894/4 "2021-11-01T11:36:59Z")

</div>

I m not getting multi-state indicator in perspective. please let me know that which component u used ?
