Holiday Notice: Support will be provided on a limited scale from December 24th, 2024, to January 2nd, 2025. Happy holidays and a wonderful New Year!


Topic: Change 'switch' toggle color

Kneidels pro asked 5 years ago


Hi there

i see the code for the material switch is:

 <div class="switch">
  <label>
    Off
    <input type="checkbox">
    <span class="lever"></span> On
  </label>
</div>

but the toggle field created is purple. Are there classes available to change this, to see blue/red when in the active/on state?

Thanks



There's no class to change the color of the switch component, but my snippet will show you how easy it is to change it


Kneidels pro commented 5 years ago

PERFECT - just what i needed.

Thanks!



Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Resolved

Specification of the issue

  • ForumUser: Pro
  • Premium support: No
  • Technology: MDB jQuery
  • MDB Version: 4.7.5
  • Device: PC
  • Browser: Firefox
  • OS: Win10
  • Provided sample code: No
  • Provided link: No