Custom Toggle Switch Generator
Style a checkbox as a custom on/off switch — pick the size and colours, preview it live (click it), then copy the HTML and CSS.
Advertisement
About this tool
Built from a real <input type="checkbox">, so it works with forms, keyboard focus and screen readers out of the box. It has role="switch", so screen readers announce it as “on” or “off”, and a hidden text label (“Dark mode” in the example), because a switch with no name just reads as “switch” with no clue what it controls. Change that text to describe your setting, or remove the ets-label class to make it visible. The knob animation is switched off for people who prefer reduced motion.