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 2.3 KB
fast-fireant-25MITToggleUiverse.io
A toggle built with plain HTML and CSS by Na3ar-17. 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 2.3 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">
<input type="checkbox" />
<span class="slider">
<span class="yolk"> </span>
<span class="back"> </span>
</span>
</label>/* From Uiverse.io by Na3ar-17 - Tags: simple, animation, action, switch, dark, modern, click, toggle switch */
/* The switch - the box around the slider */
.switch {
font-size: 17px;
position: relative;
display: inline-block;
width: 95px;
height: 50px;
background-color: #2a2a2a;
border-radius: 30px;
cursor: pointer;
}
/* Hide default HTML checkbox */
.switch input {
opacity: 0;
width: 0;
height: 0;
}
/* The slider */
.slider {
position: absolute;
top: 50%;
left: 26%;
transform: translate(-50%, -50%);
height: 40px;
width: 40px;
border-radius: 50%;
background-color: white;
transition: 0.3s cubic-bezier(0.68, -0.25, 0.265, 1.1);
overflow: hidden;
}
.slider .yolk {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 25px;
aspect-ratio: 1/1;
background-color: #f2a828;
border-radius: 50%;
-webkit-box-shadow: inset -2px -2px 43px -35px rgba(255, 255, 255, 1);
-moz-box-shadow: inset -2px -2px 43px -35px rgba(255, 255, 255, 1);
box-shadow: inset -2px -2px 43px -35px rgba(255, 255, 255, 1);
}
.slider .yolk::before {
content: "";
position: absolute;
top: 50%;
left: -22px;
transform: translate(-50%, -50%);
width: 30px;
height: 30px;
background-color: #cabea8;
border-radius: 50%;
}
.slider .yolk::after {
content: "";
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%) rotate(45deg);
width: 16px;
height: 16px;
background-color: transparent;
border-left: 6px solid #fff;
clip-path: circle(50% at 50% 50%);
}
.slider .back {
position: absolute;
top: 50%;
left: -50%;
transform: translate(-50%, -50%);
height: 40px;
width: 40px;
border-radius: 50%;
background-color: #cabea8;
transition: 0.3s cubic-bezier(0, 0, 0.265, 1.1);
overflow: hidden;
}
.slider .back::before {
content: "";
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 25px;
aspect-ratio: 1/1;
background-color: #eec076;
border-radius: 50%;
}
.switch input:checked + .slider {
left: 74%;
}
.switch input:checked + .slider .back {
left: 50%;
}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.
The white knob has a yellow yolk, and it slides across a dark track with a little springy overshoot, making a simple switch smile-worthy.
Food and recipe apps, playful settings and morning-routine products.
Change the #2a2a2a track, the 95px by 50px size, the 40px egg and the cubic-bezier(0.68,-0.25,0.265,1.1).
Build a "Fried egg toggle" component in plain HTML, CSS and JavaScript (no framework). The white knob has a yellow yolk, and it slides across a dark track with a little springy overshoot, making a simple switch smile-worthy. Use it for: Food and recipe apps, playful settings and morning-routine products. Expose these controls: Change the #2a2a2a track, the 95px by 50px size, the 40px egg and the cubic-bezier(0.68,-0.25,0.265,1.1). 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.