Performance
PassFrame rate: 60 fps average, p5 59.9 · Long tasks: 0 tasks, 0 ms total, longest 0 ms · Source gzip 1.4 KB · Runtime 1.4 KB
old-fly-17MITToggleUiverse.io
A toggle built with plain HTML and CSS by PriyanshuGupta28. 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.4 KB · Runtime 1.4 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="toggle">
<input class="input" type="checkbox">
<span class="slider"></span>
</label>/* From Uiverse.io by PriyanshuGupta28 - Tags: switch, light, 3d switch */
.toggle {
position: relative;
display: inline-block;
width: 60px;
height: 34px;
}
.toggle input {
opacity: 0;
width: 0;
height: 0;
transition: transform 0.2s ease-in-out;
}
.slider {
box-shadow: rgba(0, 0, 0, 0.25) 0px 54px 55px, rgba(0, 0, 0, 0.12) 0px -12px 30px, rgba(0, 0, 0, 0.12) 0px 4px 6px, rgba(0, 0, 0, 0.17) 0px 12px 13px, rgba(0, 0, 0, 0.09) 0px -3px 5px;
position: absolute;
cursor: pointer;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: #FF3CAC;
background-image: linear-gradient(225deg, #FF3CAC 0%, #784BA0 50%, #2B86C5 100%);
transition: 0.2 ease-in-out;
border-radius: 34px;
}
.slider:before {
position: absolute;
content: "";
height: 26px;
width: 26px;
left: 4px;
bottom: 4px;
background-color: #4158D0;
background-image: linear-gradient(43deg, #4158D0 0%, #C850C0 46%, #FFCC70 100%);
transition: transform 0.3s ease-in-out;
border-radius: 50%;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}
.input:checked + .slider {
background-color: #8BC6EC;
background-image: linear-gradient(135deg, #8BC6EC 0%, #9599E2 100%);
}
.input:checked + .slider:before {
transform: translateX(26px);
}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 track carries a pink, purple and blue diagonal gradient with deep stacked shadows, a vivid switch that floats off the page.
Creative apps, music players and colourful settings.
Change the #FF3CAC, #784BA0 and #2B86C5 gradient, the five-layer box-shadow and the 60px by 34px size.
Build a "Pink to blue gradient switch" component in plain HTML, CSS and JavaScript (no framework). The track carries a pink, purple and blue diagonal gradient with deep stacked shadows, a vivid switch that floats off the page. Use it for: Creative apps, music players and colourful settings. Expose these controls: Change the #FF3CAC, #784BA0 and #2B86C5 gradient, the five-layer box-shadow and the 60px by 34px size. 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.