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.9 KB
cuddly-bat-26MITCheckboxUiverse.io
A checkbox built with plain HTML and CSS by Praashoo7. 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.9 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="theme-switch" for="checkbox" id="themeswitch">
<input type="checkbox" id="checkbox">
<div class="slider round"></div>
<span class="name"></span>
<div class="back"></div>
</label>/* From Uiverse.io by Praashoo7 - Tags: checkbox, moon, sun, light&dark, box-shadow */
.theme-switch {
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
cursor: pointer;
width: 9em;
height: 2.5em;
font-size: 20px;
font-family: Montserrat;
font-weight: 600;
color: black;
background-color: white;
padding: 0.5em;
border: 1px solid black;
box-shadow: 6px 6px 0px black;
transition: .4s;
z-index: 1;
}
.name::before {
color: black;
content: "Dark Mode";
margin-right: 2em;
transition: .2s ease-in-out;
}
.name::after {
color: black;
content: "Light Mode";
margin-right: 1.7em;
transition: .2s ease-in-out;
display: none;
}
.theme-switch .slider {
position: absolute;
background-color: #222;
margin-left: 6.2em;
width: 25px;
height: 25px;
border-radius: 50%;
border: 4px solid #222;
transform: rotate(-120deg);
box-shadow: inset 0px 6px #999, inset 0px 6px 1px 1px #999;
-moz-box-shadow: inset 0px 6px #999, inset 0px 6px 1px 1px #999;
}
.theme-switch:hover {
color: white;
cursor: pointer;
box-shadow: none;
transform: translateX(6px) translateY(6px);
background-color: black;
border: none;
}
.theme-switch:hover .name::before {
color: white;
}
.theme-switch:hover .name::after {
color: white;
}
.theme-switch input[type=checkbox]:checked + .slider {
transform: rotate(360deg);
box-shadow: none;
border: 4px solid #F28C38;
background-color: #F28C38;
}
.theme-switch input[type=checkbox]:checked ~ .name::before {
display: none;
}
.theme-switch input[type=checkbox]:checked ~ .name::after {
display: block;
}
.theme-switch input[type=checkbox] {
position: absolute;
visibility: hidden;
}
.slider {
transition: 300ms ease;
}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 white box with a black border and hard 6px shadow reads Dark Mode, and the slider flips the colours when checked, bold and very clear.
Theme switches on blogs, documentation and brutalist sites.
Change the 6px box-shadow, the 9em by 2.5em size, the Dark Mode label text and the 0.4s transition.
Build a "Dark mode label switch" component in plain HTML, CSS and JavaScript (no framework). A white box with a black border and hard 6px shadow reads Dark Mode, and the slider flips the colours when checked, bold and very clear. Use it for: Theme switches on blogs, documentation and brutalist sites. Expose these controls: Change the 6px box-shadow, the 9em by 2.5em size, the Dark Mode label text and the 0.4s 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.