Toggle switches are acquainted UI controls for turning settings and choices on or off. You will see that them in types, dashboards, choice panels, and interfaces the place a state wants to alter instantly.
Change controls are constructed into iOS, Android, and different working methods, however net initiatives typically want customized HTML, CSS, or JavaScript to match the design and habits of the remainder of the interface. A fundamental checkbox can grow to be a swap with CSS, whereas JavaScript provides extra management over states, interactions, and reusable parts.
The ten picks right here cowl jQuery plugins, vanilla JavaScript parts, and pure CSS approaches. They vary from light-weight checkbox styling and iOS-style switches to three-state controls and switches with JavaScript APIs.
Initially revealed Jan 03 2018, updated Aug 10 2026
Desk of contents:
Toggle Change Comparability
| Library | Sort | Greatest Use |
|---|---|---|
| LC Change | jQuery / Vanilla JS | Two-state checkbox and radio switches with strategies and standing occasions. |
| Switcher | jQuery | Two-state iOS-style checkbox and radio switches. |
| jToggler | jQuery | Two-state or three-state checkbox switches with an indeterminate state. |
| switchify | jQuery | Compact two-state checkbox-to-switch conversion. |
| Candlestick | jQuery | Three-state checkbox controls with optionally available swipe gestures. |
| SlideOn | Vanilla JS | Two-state checkbox switches with preset sizes, shapes, and themes. |
| Toggle Change | Net Part | Reusable two-state customized components with attribute-based styling. |
| el-checkbox | Pure CSS | Checkbox, radio, and swap styling from one stylesheet. |
| vc-toggle-switch | Pure CSS | Two-state switches with seen ON/OFF labels and CSS variables. |
| slider.css | Pure CSS | Two-state and three-state controls constructed from radio inputs. |
Native HTML/CSS Toggle Change
A two-state setting doesn’t require a JavaScript library. A checkbox shops the worth, participates in types, and pairs with a label. CSS can flip the visible management right into a sliding swap.
<label class="toggle-control"> <enter kind="checkbox" title="notifications"> <span class="toggle-track" aria-hidden="true"></span> <span>E mail notifications</span> </label>
.toggle-control {
show: inline-flex;
align-items: middle;
hole: 0.65rem;
cursor: pointer;
}
.toggle-control enter {
place: absolute;
width: 1px;
top: 1px;
opacity: 0;
}
.toggle-track {
place: relative;
width: 44px;
top: 24px;
border-radius: 999px;
background: #b7bcc4;
transition: background 0.2s ease;
}
.toggle-track::after {
content material: "";
place: absolute;
prime: 3px;
left: 3px;
width: 18px;
top: 18px;
border-radius: 50%;
background: #fff;
transition: remodel 0.2s ease;
}
.toggle-control enter:checked + .toggle-track {
background: #2463eb;
}
.toggle-control enter:checked + .toggle-track::after {
remodel: translateX(20px);
}
.toggle-control enter:focus-visible + .toggle-track {
define: 2px strong currentColor;
outline-offset: 3px;
}
The experimental HTML swap attribute applies to checkbox inputs and identifies the management as an on/off swap:
<label for="dark-mode">Darkish mode</label> <enter kind="checkbox" id="dark-mode" title="dark-mode" swap>
Supporting browsers can render the checkbox with swap styling. Browsers that don’t acknowledge the attribute ignore it and preserve regular checkbox habits. Use CSS when the management wants a constant look throughout browsers.
Greatest jQuery Toggle Change Plugins:
JavaScript Plugin For Sliding Toggle Switches – LC Change
LC Change converts native checkbox and radio inputs into sliding switches and exposes each jQuery and vanilla JavaScript APIs. Public strategies toggle, allow, disable, replace, and destroy cases, and the plugin emits occasions when a subject adjustments state.

Fundamental ON/OFF Toggle Switches In jQuery – Switcher
Switcher transforms native checkbox and radio inputs into iOS-style on/off controls by means of one jQuery initializer. CSS handles the visible transition and may be overridden to match the encircling type.

Three States Toggle Change With jQuery – jQuery jToggler
jToggler turns a checkbox into an iOS-style swap with checked, unchecked, and optionally available indeterminate states. Knowledge attributes add a customized label and allow the multi-state mode, and the plugin emits occasions after regular or multi-state adjustments.

Rework Checkbox Into Toggle Change – jQuery switchify
switchify converts checkbox inputs into iOS-style switches by means of a single jQuery name. Its stylesheet controls the observe, deal with, checked state, and transition, so you’ll be able to modify the swap look by means of CSS.

jQuery Plugin For Tri-state Toggle Switches – Candlestick
Candlestick converts a checkbox right into a three-state management with checked, unchecked, and default values. It exposes measurement and worth choices, callbacks, and a reset command. Swipe gestures require Hammer.js and the jQuery Hammer adapter.

Greatest Vanilla JavaScript Toggle Change Plugins:
Clean iOS Model Slide Change Part – SlideOn
SlideOn converts checkbox inputs into sliding switches with JavaScript and CSS. Its lessons cowl sq. styling, 5 measurement presets, theme variants, and padding changes.

Customizable Rounded & Sq. Toggle Change Net Part
This Net Part provides a <toggle-switch> customized ingredient with rounded and sq. variants. A hidden enter shops its boolean state, and attributes management dimensions, colours, padding, form, and transition period.

Greatest CSS Solely Toggle Switches:
CSS/CSS3 Solely Customized Checkboxes, Radios And Switches – el-checkbox
el-checkbox is a CSS-only bundle for customized checkboxes, radio buttons, and iOS-style switches. It ships with 4 shade themes and three preset sizes and doesn’t require JavaScript initialization.

Clean iOS Model Change In Pure CSS – vc-toggle-switch.css
vc-toggle-switch.css types an ordinary checkbox as an iOS-style swap with an animated deal with. data-on and data-off set the seen labels, and CSS customized properties management colours, dimensions, typography, and animation timing.

Radio Button Based mostly 3-state Toggle/Change Management – slider.css
slider.css types radio teams as two-state or three-state swap controls. The three-position sample assigns one radio enter to every worth. CSS variables management the primary colours and textual content styling.

The right way to Select a Toggle Change
- Fundamental binary settings: Begin with a local checkbox and CSS when no further API is required.
- Present jQuery types: LC Change, Switcher, jToggler, switchify, and Candlestick match pages that already load jQuery.
- Three-state information: jToggler and Candlestick deal with an indeterminate checkbox state. slider.css makes use of three radio values for a similar visible sample.
- Framework-free JavaScript: SlideOn retains native checkbox markup. The Net Part packages the management as a customized ingredient.
- CSS-only styling: el-checkbox covers a number of type controls, vc-toggle-switch.css provides labeled switches, and slider.css handles radio-based multi-state selections.
Toggle Change vs Toggle Button
A toggle swap adjustments a persistent setting between on and off and generally maps to a checkbox. A toggle button represents a pressed or chosen motion state and will seem inside button teams or segmented controls.
For button-style state controls, examine the 10 Greatest Toggle Button Plugins In JavaScript & CSS.
Toggle Change Accessibility
For binary type settings, a local checkbox with an related label provides built-in keyboard and type habits. Customized styling ought to protect keyboard focus and preserve the underlying enter interactive.
A non-native binary widget with function="swap" should preserve aria-checked synchronized to true or false. The swap function has no combined state. Use checkbox semantics for an indeterminate state, or radio inputs when the interface represents three distinct selections.

