# Perspective Fancy CSS - Toggle switches

**URL:** <https://forum.inductiveautomation.com/t/perspective-fancy-css-toggle-switches/72623>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [April 19, 2023, 6:03am UTC](https://forum.inductiveautomation.com/t/perspective-fancy-css-toggle-switches/72623 "2023-04-19T06:03:07Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [April 19, 2023, 6:03am UTC](https://forum.inductiveautomation.com/t/perspective-fancy-css-toggle-switches/72623/1 "2023-04-19T06:03:07Z")

</div>

I found these...  
https://codepen.io/alvarotrigo/embed/preview/oNoJePo?default-tabs=css%2Cresult&height=300&host=https%3A%2F%2Fcodepen.io&slug-hash=oNoJePo

I've tried to get button-10 into Perspective, but I'm struggling a bit... I scraped away all of the irrelevant stuff and added `psc-` to the start of all the classes that the HTML DOM components reference, but I don't really know how to apply them to components in Ignition...

```auto
.psc-button-cover:before {
  counter-increment: button-counter;
  content: counter(button-counter);
  position: absolute;
  right: 0;
  bottom: 0;
  color: #d7e3e3;
  font-size: 12px;
  line-height: 1;
  padding: 5px;
}

.psc-button-cover,
.knobs,
.layer {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
}

.psc-button {
  position: relative;
  /*top: 50%;*/
  width: 74px;
  height: 36px;
  /*margin: -20px auto 0 auto;*/
  overflow: hidden;
}

.psc-button..psc-b2 {
  border-radius: 2px;
}

.psc-checkbox {
  position: relative;
  width: 100%;
  height: 100%;
  padding: 0;
  margin: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 3;
}

.knobs {
  z-index: 2;
}

.layer {
  width: 100%;
  background-color: #ebf7fc;
  transition: 0.3s ease all;
  z-index: 1;
}

/* Button 10 */
.psc-button-10 .knobs:before,
.psc-button-10 .knobs:after,
.psc-button-10 .knobs span {
  position: absolute;
  top: 4px;
  width: 20px;
  height: 10px;
  font-size: 10px;
  font-weight: bold;
  text-align: center;
  line-height: 1;
  padding: 9px 4px;
  border-radius: 2px;
  transition: 0.3s ease all;
}

.psc-button-10 .knobs:before {
  content: "";
  left: 4px;
  background-color: #03a9f4;
}

.psc-button-10 .knobs:after {
  content: "NO";
  right: 4px;
  color: #4e4e4e;
}

.psc-button-10 .knobs span {
  display: inline-block;
  left: 4px;
  color: #fff;
  z-index: 1;
}

.psc-button-10 .psc-checkbox:checked + .knobs span {
  color: #4e4e4e;
}

.psc-button-10 .psc-checkbox:checked + .knobs:before {
  left: 42px;
  background-color: #f44336;
}

.psc-button-10 .psc-checkbox:checked + .knobs:after {
  color: #fff;
}

.psc-button-10 .psc-checkbox:checked ~ .layer {
  background-color: #fcebeb;
}

```

I like 5 as well, but I really want to have the 2 states shown always. I actually want to replace these labels with icons....

Also, in that example, where is the "NO" label defined??? I can see YES in the HTML, but no NO?

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