Performance
PassFrame rate: 60 fps average, p5 59.9 · Long tasks: 0 tasks, 0 ms total, longest 0 ms · Source gzip 1.5 KB · Runtime 1.6 KB
ordinary-ape-65MITToggleUiverse.io
A toggle built with plain HTML and CSS by PriyanshuGupta28. Collected from Uiverse.io under the MIT licence and shown here live.
Quality report
The grade and score come from automated checks run at build or test time. If a check did not run, it is marked Not tested — numbers are never invented.
Frame rate: 60 fps average, p5 59.9 · Long tasks: 0 tasks, 0 ms total, longest 0 ms · Source gzip 1.5 KB · Runtime 1.6 KB
Issues 0 · Screen reader: Needs attention
No continuous motion
No overflow
Frame rate and long-task figures were measured in headless Chromium with software WebGL. They are only comparable between components on this site, and do not represent real devices.
Not applicable: no visible animation at rest. Hover-triggered animation was not tested.
No axe-core violations.

Checked Nov 15, 2026 · Figures come from an automated script, not from hand-written samples.
Shown at real size.
The copy starts with the licence notice. Keep it when you use the code.
<div class="checkbox-wrapper-51">
<input id="cbx-51" type="checkbox">
<label class="toggle" for="cbx-51">
<span>
<svg viewBox="0 0 10 10" height="10px" width="10px">
<path d="M5,1 L5,1 C2.790861,1 1,2.790861 1,5 L1,5 C1,7.209139 2.790861,9 5,9 L5,9 C7.209139,9 9,7.209139 9,5 L9,5 C9,2.790861 7.209139,1 5,1 L5,9 L5,1 Z"></path>
</svg>
</span>
</label>
</div>/* From Uiverse.io by PriyanshuGupta28 - Tags: switch, light switch, 3d switch, cool switch */
.checkbox-wrapper-51 input[type="checkbox"] {
visibility: hidden;
display: none;
}
.checkbox-wrapper-51 .toggle {
position: relative;
display: block;
width: 42px;
height: 24px;
cursor: pointer;
-webkit-tap-highlight-color: transparent;
transform: translate3d(0, 0, 0);
}
.checkbox-wrapper-51 .toggle:before {
content: "";
position: relative;
top: 1px;
left: 1px;
width: 40px;
height: 22px;
display: block;
background: #c8ccd4;
border-radius: 12px;
transition: background 0.2s ease;
}
.checkbox-wrapper-51 .toggle span {
position: absolute;
top: 0;
left: 0;
width: 24px;
height: 24px;
display: block;
background: #fff;
border-radius: 50%;
box-shadow: 0 2px 6px rgba(154,153,153,0.75);
transition: all 0.2s ease;
}
.checkbox-wrapper-51 .toggle span svg {
margin: 7px;
fill: none;
}
.checkbox-wrapper-51 .toggle span svg path {
stroke: #c8ccd4;
stroke-width: 2;
stroke-linecap: round;
stroke-linejoin: round;
stroke-dasharray: 24;
stroke-dashoffset: 0;
transition: all 0.5s linear;
}
.checkbox-wrapper-51 input[type="checkbox"]:checked + .toggle:before {
background: #1175c7;
}
.checkbox-wrapper-51 input[type="checkbox"]:checked + .toggle span {
transform: translateX(18px);
}
.checkbox-wrapper-51 input[type="checkbox"]:checked + .toggle span path {
stroke: #000000;
stroke-dasharray: 25;
stroke-dashoffset: 25;
}Controls · HTML · CSS · JS
Edit the code and tune it with the controls. The preview updates as you type.

This component runs from a bundled build, so its script is read-only here. Edit the HTML and CSS; the full source is in the Code tab.
Edit every component live, tune it with controls, download the full source and copy the advanced prompts.
$49 one-timePlaceholder price
Test mode: no real payment is taken.
Free: preview, copy buttons and the lesson notes.
A compact 42px by 24px switch whose knob carries a small tick icon that shows when on, neat for dense settings lists.
Compact settings rows, table controls and mobile forms.
Change the #c8ccd4 off track colour, the on colour, the 42px by 24px size and the 0.2s background transition.
Build a "Tiny tick knob switch" component in plain HTML, CSS and JavaScript (no framework). A compact 42px by 24px switch whose knob carries a small tick icon that shows when on, neat for dense settings lists. Use it for: Compact settings rows, table controls and mobile forms. Expose these controls: Change the #c8ccd4 off track colour, the on colour, the 42px by 24px size and the 0.2s background transition. Support light and dark themes, respect prefers-reduced-motion with a still frame, keep text readable and controls keyboard accessible. Write original code; do not copy from paid or restricted component libraries.
A longer prompt with tuning, accessibility and integration steps.