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 3.0 KB
average-duck-41MITToggleUiverse.io
A toggle built with plain HTML and CSS by Shoh2008. 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 3.0 KB
Issues 0 · Screen reader: Pass
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-8">
<input type="checkbox" id="cb3-8" class="tgl tgl-skewed">
<label for="cb3-8" data-tg-on="ON" data-tg-off="OFF" class="tgl-btn"></label>
</div>/* From Uiverse.io by Shoh2008 - Tags: switch */
.checkbox-wrapper-8 .tgl {
display: none;
}
.checkbox-wrapper-8 .tgl,
.checkbox-wrapper-8 .tgl:after,
.checkbox-wrapper-8 .tgl:before,
.checkbox-wrapper-8 .tgl *,
.checkbox-wrapper-8 .tgl *:after,
.checkbox-wrapper-8 .tgl *:before,
.checkbox-wrapper-8 .tgl + .tgl-btn {
box-sizing: border-box;
}
.checkbox-wrapper-8 .tgl::-moz-selection,
.checkbox-wrapper-8 .tgl:after::-moz-selection,
.checkbox-wrapper-8 .tgl:before::-moz-selection,
.checkbox-wrapper-8 .tgl *::-moz-selection,
.checkbox-wrapper-8 .tgl *:after::-moz-selection,
.checkbox-wrapper-8 .tgl *:before::-moz-selection,
.checkbox-wrapper-8 .tgl + .tgl-btn::-moz-selection,
.checkbox-wrapper-8 .tgl::selection,
.checkbox-wrapper-8 .tgl:after::selection,
.checkbox-wrapper-8 .tgl:before::selection,
.checkbox-wrapper-8 .tgl *::selection,
.checkbox-wrapper-8 .tgl *:after::selection,
.checkbox-wrapper-8 .tgl *:before::selection,
.checkbox-wrapper-8 .tgl + .tgl-btn::selection {
background: none;
}
.checkbox-wrapper-8 .tgl + .tgl-btn {
outline: 0;
display: block;
width: 4em;
height: 2em;
position: relative;
cursor: pointer;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.checkbox-wrapper-8 .tgl + .tgl-btn:after,
.checkbox-wrapper-8 .tgl + .tgl-btn:before {
position: relative;
display: block;
content: "";
width: 50%;
height: 100%;
}
.checkbox-wrapper-8 .tgl + .tgl-btn:after {
left: 0;
}
.checkbox-wrapper-8 .tgl + .tgl-btn:before {
display: none;
}
.checkbox-wrapper-8 .tgl:checked + .tgl-btn:after {
left: 50%;
}
.checkbox-wrapper-8 .tgl-skewed + .tgl-btn {
overflow: hidden;
transform: skew(-10deg);
-webkit-backface-visibility: hidden;
backface-visibility: hidden;
transition: all 0.2s ease;
font-family: sans-serif;
background: #888;
}
.checkbox-wrapper-8 .tgl-skewed + .tgl-btn:after,
.checkbox-wrapper-8 .tgl-skewed + .tgl-btn:before {
transform: skew(10deg);
display: inline-block;
transition: all 0.2s ease;
width: 100%;
text-align: center;
position: absolute;
line-height: 2em;
font-weight: bold;
color: #fff;
text-shadow: 0 1px 0 rgba(0, 0, 0, 0.4);
}
.checkbox-wrapper-8 .tgl-skewed + .tgl-btn:after {
left: 100%;
content: attr(data-tg-on);
}
.checkbox-wrapper-8 .tgl-skewed + .tgl-btn:before {
left: 0;
content: attr(data-tg-off);
}
.checkbox-wrapper-8 .tgl-skewed + .tgl-btn:active {
background: #888;
}
.checkbox-wrapper-8 .tgl-skewed + .tgl-btn:active:before {
left: -10%;
}
.checkbox-wrapper-8 .tgl-skewed:checked + .tgl-btn {
background: #86d993;
}
.checkbox-wrapper-8 .tgl-skewed:checked + .tgl-btn:before {
left: -100%;
}
.checkbox-wrapper-8 .tgl-skewed:checked + .tgl-btn:after {
left: 0;
}
.checkbox-wrapper-8 .tgl-skewed:checked + .tgl-btn:active:after {
left: 10%;
}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 slanted box flips between OFF and ON labels with a skewed slide, punchy and readable like a sports scoreboard.
Settings with explicit states, admin panels and bold UI kits.
Change the data-tg-on and data-tg-off labels, the skew angle, the on and off colours and the slide timing.
Build a "Skewed ON OFF switch" component in plain HTML, CSS and JavaScript (no framework). A slanted box flips between OFF and ON labels with a skewed slide, punchy and readable like a sports scoreboard. Use it for: Settings with explicit states, admin panels and bold UI kits. Expose these controls: Change the data-tg-on and data-tg-off labels, the skew angle, the on and off colours and the slide timing. 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.