# Style Classes Element State Checked

**URL:** <https://forum.inductiveautomation.com/t/style-classes-element-state-checked/76713>\
**Category:** Ignition\
**Tags:** ignition81, perspective\
**Created:** [July 21, 2023, 3:35pm UTC](https://forum.inductiveautomation.com/t/style-classes-element-state-checked/76713 "2023-07-21T15:35:14Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![T\_Babcock](https://avatars.discourse-cdn.com/v4/letter/t/f9ae1b/32.png) [@T\_Babcock](https://forum.inductiveautomation.com/u/T_Babcock)\
**Post date:** [July 21, 2023, 3:35pm UTC](https://forum.inductiveautomation.com/t/style-classes-element-state-checked/76713/1 "2023-07-21T15:35:14Z")

</div>

I am having troubles with the Element State Checked, with using a Checkbox. User manual indicates this should work when the component is in the "on" State.

Anyhow, this is the style I am trying to use.

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/b/0/b051126667a7619f6d486e342e28e17f117a37a4.png)  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/4/9/49a1eba865bf1017d6113b10135f9f0c0a69a00d.png)  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/8/f/8fc09b47ec1a6119207eee5265e336fa9529de2a.png)

The Hover works as intended, however the Checked Element State does not.  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/a/d/ad709923f873418cbae70af9a0cede3491dbd8cc.png)  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/2/3/23eaf0340731400358c5da64a8828b990e09fd48.png)  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/a/1/a19d9c647585af8d937706b47cbe6e9b14e05433.png)

I have updated the gateway to 8.1.30, thinking maybe this had been fixed from 8.1.24. That didn't work.

I have also tried a Toggle and Radio Button, both of which didn't work as well when the component was selected. The only way I could get it to work was binding the style class to the selected property. However, this involves 2 different styles and I am trying to steer clear of having to do that.

---

<div class="post-metadata">

**Author:** ![aaronrai24](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/aaronrai24/32/87248_2.png) [@aaronrai24](https://forum.inductiveautomation.com/u/aaronrai24)\
**Post date:** [July 21, 2023, 5:47pm UTC](https://forum.inductiveautomation.com/t/style-classes-element-state-checked/76713/2 "2023-07-21T17:47:41Z")

</div>

Using the browser's dev tools, I can see the `:hover` element state gets applied to the checkbox component but not the `:checked` element state. I want to say that since the checkbox component has styles for checked and unchecked exposed in the properties this element state doesn't apply to it, but I could be wrong.

> [@T\_Babcock](#):
>
> User manual indicates this should work when the component is in the "on" State.

Where does the user manual say this?

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/d/3/d310191dc7c214d9dde4eaf03cf625ef6eb3a81a.png)  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/8/7/87a5c4bd792732fce9dd1cb03de83483e6d98c5c.png)

---

<div class="post-metadata">

**Author:** ![T\_Babcock](https://avatars.discourse-cdn.com/v4/letter/t/f9ae1b/32.png) [@T\_Babcock](https://forum.inductiveautomation.com/u/T_Babcock)\
**Post date:** [July 21, 2023, 6:17pm UTC](https://forum.inductiveautomation.com/t/style-classes-element-state-checked/76713/3 "2023-07-21T18:17:15Z")

</div>

> [@aaronrai24](#):
>
> Where does the user manual say this?

Right here.

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

It is odd, it should be super straight forward. I can get the Active Element State to work, but not the Checked.

---

<div class="post-metadata">

**Author:** ![Neb](https://avatars.discourse-cdn.com/v4/letter/n/e495f1/32.png) [@Neb](https://forum.inductiveautomation.com/u/Neb)\
**Post date:** [April 29, 2025, 9:10am UTC](https://forum.inductiveautomation.com/t/style-classes-element-state-checked/76713/4 "2025-04-29T09:10:42Z")

</div>

Hi, im having the same problem, is there any fix or workaround?
