Performance
PassFrame rate: 60 fps average, p5 59.5 · Long tasks: 0 tasks, 0 ms total, longest 0 ms · Source gzip 1.7 KB · Runtime 2.8 KB
massive-dodo-67MITToggleUiverse.io
A toggle built with plain HTML and CSS by Admin12121. 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.5 · Long tasks: 0 tasks, 0 ms total, longest 0 ms · Source gzip 1.7 KB · Runtime 2.8 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.
<label class="switch-button" for="switch">
<div class="switch-outer">
<input id="switch" type="checkbox">
<div class="button">
<span class="button-toggle"></span>
<span class="button-indicator"></span>
</div>
</div>
</label>/* From Uiverse.io by Admin12121 - Tags: switch, animated, click effect */
.switch-button {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-align: center;
align-items: center;
-webkit-box-pack: center;
justify-content: center;
justify-content: center;
margin: auto;
height: 55px;
}
.switch-button .switch-outer {
height: 100%;
background: #252532;
width: 115px;
border-radius: 165px;
-webkit-box-shadow: inset 0px 5px 10px 0px #16151c, 0px 3px 6px -2px #403f4e;
box-shadow: inset 0px 5px 10px 0px #16151c, 0px 3px 6px -2px #403f4e;
border: 1px solid #32303e;
padding: 6px;
-webkit-box-sizing: border-box;
box-sizing: border-box;
cursor: pointer;
-webkit-tap-highlight-color: transparent;
}
.switch-button .switch-outer input[type="checkbox"] {
opacity: 0;
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
position: absolute;
}
.switch-button .switch-outer .button-toggle {
height: 42px;
width: 42px;
background: -webkit-gradient(
linear,
left top,
left bottom,
from(#3b3a4e),
to(#272733)
);
background: -o-linear-gradient(#3b3a4e, #272733);
background: linear-gradient(#3b3a4e, #272733);
border-radius: 100%;
-webkit-box-shadow: inset 0px 5px 4px 0px #424151, 0px 4px 15px 0px #0f0e17;
box-shadow: inset 0px 5px 4px 0px #424151, 0px 4px 15px 0px #0f0e17;
position: relative;
z-index: 2;
-webkit-transition: left 0.3s ease-in;
-o-transition: left 0.3s ease-in;
transition: left 0.3s ease-in;
left: 0;
}
.switch-button
.switch-outer
input[type="checkbox"]:checked
+ .button
.button-toggle {
left: 58%;
}
.switch-button
.switch-outer
input[type="checkbox"]:checked
+ .button
.button-indicator {
-webkit-animation: indicator 1s forwards;
animation: indicator 1s forwards;
}
.switch-button .switch-outer .button {
width: 100%;
height: 100%;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
position: relative;
-webkit-box-pack: justify;
justify-content: space-between;
}
.switch-button .switch-outer .button-indicator {
height: 25px;
width: 25px;
top: 50%;
-webkit-transform: translateY(-50%);
transform: translateY(-50%);
border-radius: 50%;
border: 3px solid #ef565f;
-webkit-box-sizing: border-box;
box-sizing: border-box;
right: 10px;
position: relative;
}
@-webkit-keyframes indicator {
30% {
opacity: 0;
}
0% {
opacity: 1;
}
100% {
opacity: 1;
border: 3px solid #60d480;
left: -68%;
}
}
@keyframes indicator {
30% {
opacity: 0;
}
0% {
opacity: 1;
}
100% {
opacity: 1;
border: 3px solid #60d480;
left: -68%;
}
}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 deep recessed track and a round knob with a top highlight and drop shadow look machined, like a switch on an audio amp.
Dark dashboards, audio or studio tools and premium settings.
Change the #252532 track, the #3b3a4e to #272733 knob gradient, the 115px by 55px size and the 42px knob.
Build a "Dark hardware knob switch" component in plain HTML, CSS and JavaScript (no framework). A deep recessed track and a round knob with a top highlight and drop shadow look machined, like a switch on an audio amp. Use it for: Dark dashboards, audio or studio tools and premium settings. Expose these controls: Change the #252532 track, the #3b3a4e to #272733 knob gradient, the 115px by 55px size and the 42px knob. 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.