This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Custom Switch MDC
#1
Hello.
Is it possible to use a custom switch such as this?

https://henan-guanjie.gitee.io/ui-design...index.html

https://material-components.github.io/ma...ent/switch

Attached Files Thumbnail(s)
       
Reply
#2
Where exactly do you want to use it? The standard toggle element can be styled via CSS to have a similar look.
Reply
#3
I'd like to use it throughout the visualisation. Is there an easy way for a not super technical person to style 'inline' switch to look like one of these?
Reply
#4
Add to Custom CSS:
Code:
.toggler {
  width: 84px;
  border: none;
  overflow: visible;
}
.toggler .btn-toggler {
  color: transparent !important;
  text-shadow: none;
  padding: 0;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  box-shadow: 0 0 1px 3px rgba(0, 0, 0, 0.2);
}
.toggler .btn-bg {
  padding: 0;
  width: 64px;
  height: 22px;
  margin: 10px;
  border-radius: 11px;
}

You can adjust the Control size scale property in Vis. parameters to make it bigger/smaller as needed.
Reply
#5
That works fantastic and looks great!

Would you be able to help me out with a dimmer slider to suit?

Thank you so much
Reply
#6
See this thread, you can modify it as needed
https://forum.logicmachine.net/showthrea...44#pid2544
------------------------------
Ctrl+F5
Reply


Forum Jump: