Performance
PassFrame rate: 60 fps average, p5 59.9 · Long tasks: 0 tasks, 0 ms total, longest 0 ms · Source gzip 1.3 KB · Runtime 1.4 KB
fresh-fireant-15MITToggleUiverse.io
A toggle built with plain HTML and CSS by Madflows. 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.3 KB · Runtime 1.4 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="toggle-switch">
<label class="switch-label">
<input type="checkbox" class="checkbox">
<span class="slider"></span>
</label>
</div>/* From Uiverse.io by Madflows - Tags: switch */
.toggle-switch {
position: relative;
width: 100px;
height: 50px;
--light: #d8dbe0;
--dark: #28292c;
--link: rgb(27, 129, 112);
--link-hover: rgb(24, 94, 82);
}
.switch-label {
position: absolute;
width: 100%;
height: 50px;
background-color: var(--dark);
border-radius: 25px;
cursor: pointer;
border: 3px solid var(--dark);
}
.checkbox {
position: absolute;
display: none;
}
.slider {
position: absolute;
width: 100%;
height: 100%;
border-radius: 25px;
-webkit-transition: 0.3s;
transition: 0.3s;
}
.checkbox:checked ~ .slider {
background-color: var(--light);
}
.slider::before {
content: "";
position: absolute;
top: 10px;
left: 10px;
width: 25px;
height: 25px;
border-radius: 50%;
-webkit-box-shadow: inset 12px -4px 0px 0px var(--light);
box-shadow: inset 12px -4px 0px 0px var(--light);
background-color: var(--dark);
-webkit-transition: 0.3s;
transition: 0.3s;
}
.checkbox:checked ~ .slider::before {
-webkit-transform: translateX(50px);
-ms-transform: translateX(50px);
transform: translateX(50px);
background-color: var(--dark);
-webkit-box-shadow: none;
box-shadow: none;
}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 100px dark track holds a light knob that slides and turns the track teal, simple and well balanced.
Settings in dark interfaces and theme preferences.
Set --light, --dark, --link (rgb(27,129,112)) and --link-hover, plus the 100px by 50px size and 0.3s transition.
Build a "Dark to teal switch" component in plain HTML, CSS and JavaScript (no framework). A 100px dark track holds a light knob that slides and turns the track teal, simple and well balanced. Use it for: Settings in dark interfaces and theme preferences. Expose these controls: Set --light, --dark, --link (rgb(27,129,112)) and --link-hover, plus the 100px by 50px size and 0.3s 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.