Performance
PassFrame rate: 58.3 fps average, p5 59.5 · Long tasks: 0 tasks, 0 ms total, longest 0 ms · Source gzip 1.8 KB · Runtime 4.8 KB
terrible-frog-94MITToggleUiverse.io
A toggle built with plain HTML and CSS by csemszepp. 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: 58.3 fps average, p5 59.5 · Long tasks: 0 tasks, 0 ms total, longest 0 ms · Source gzip 1.8 KB · Runtime 4.8 KB
Issues 0 · Screen reader: Pass
No continuous motion
No overflow · 1
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="form">
<input type="checkbox" id="bubble">
<label class="bubble" for="bubble"></label>
</div>/* From Uiverse.io by csemszepp - Source: https://codepen.io/onediv/pen/pjgNqJ - Tags: switch, toggle switch */
.form {
position: absolute;
top: 50%;
left: 50%;
height: 100px;
padding: 10px 0;
width: 260px;
transform: translate3d(-50%,-50%,0);
}
.form:before {
content: '';
position: absolute;
top: 0;
left: -5px;
height: 100%;
width: 120px;
background-color: #243548;
border-radius: 50%;
box-shadow: 75px 0 0 #243548, 150px 0 0 #243548;
}
.form:after {
content: '';
position: absolute;
top: -94px;
left: 70px;
height: 100%;
width: 120px;
border-radius: 50%;
}
.form input {
position: absolute;
left: -9999px;
}
.bubble {
position: absolute;
z-index: 2;
cursor: pointer;
top: 50%;
left: 50%;
height: 100px;
width: 100px;
transform: translate3d(-75%,-50%,0);
margin-left: -50px;
background: #BBBBBB;
border-radius: 50% 50% 50% 50% / 50% 50% 50% 50%;
border-right: 0px solid #BBBBBB;
border-left: 0px solid #BBBBBB;
animation: toggle-reverse 2s 1;
}
#bubble:checked + .bubble {
animation: toggle 2s 1;
transform: translate3d(75%,-50%,0);
background: #3CCC97;
}
.bubble:after {
content: '';
position: absolute;
top: 50%;
margin-top: -15px;
margin-left: -2px;
height: 30px;
width: 4px;
background: #fff;
left: 50%;
transform: rotate(45deg);
border-radius: 2px;
transition: 500ms ease all 1.25s;
}
.bubble:before {
content: '';
position: absolute;
top: 50%;
margin-top: -15px;
margin-left: -2px;
height: 30px;
width: 4px;
background: #fff;
left: 50%;
transform: rotate(-45deg);
border-radius: 2px;
transition: 500ms ease all 1.25s;
}
#bubble:checked + .bubble:after {
content: '';
position: absolute;
top: 50%;
margin-top: -15px;
margin-left: 5px;
height: 30px;
width: 4px;
background: #fff;
left: 50%;
transform: rotate(225deg);
border-radius: 2px;
}
#bubble:checked + .bubble:before {
content: '';
position: absolute;
top: 50%;
margin-top: -7px;
margin-left: -10px;
height: 20px;
width: 4px;
background: #fff;
left: 50%;
transform: rotate(-215deg);
border-radius: 2px;
}
@keyframes toggle {
0% {
transform: translate3d(-75%,-50%,0);
border-right: 0 solid #BBBBBB;
border-left: 0 solid #BBBBBB;
background: #BBBBBB;
border-radius: 50% 50% 50% 50% / 50% 50% 50% 50%;
height: 100px;
}
20% {
border-right: 0 solid #BBBBBB;
border-left: 0 solid #BBBBBB;
border-radius: 50% 50% 50% 50% / 50% 50% 50% 50%;
transform: translate3d(-75%,-50%,0);
height: 100px;
}
40% {
border-left: 0 solid #BBBBBB;
border-radius: 35% 65% 65% 35% / 50% 50% 50% 50%;
height: 90px;
}
50% {
transform: translate3d(0%,-50%,0);
border-right: 25px solid #BBBBBB;
border-left: 0 solid #BBBBBB;
background: #BBBBBB;
border-radius: 50% 50% 50% 50% / 50% 50% 50% 50%;
height: 90px;
}
75% {
border-left: 25px solid #3CCC97;
border-color: #3CCC97;
background: #3CCC97;
border-radius: 65% 35% 35% 65% / 50% 50% 50% 50%;
height: 90px;
}
100% {
border-right: 0 solid #3CCC97;
border-left: 0 solid #3CCC97;
border-radius: 50% 50% 50% 50% / 50% 50% 50% 50%;
transform: translate3d(75%,-50%,0);
height: 100px;
width: 100px
}
}
@keyframes toggle-reverse {
0% {
transform: translate3d(75%,-50%,0);
background: #3CCC97;
border-right: 0 solid #3CCC97;
border-left: 0 solid #3CCC97;
border-radius: 50% 50% 50% 50% / 50% 50% 50% 50%;
height: 100px;
}
20% {
border-right: 0 solid #3CCC97;
border-left: 0 solid #3CCC97;
border-radius: 50% 50% 50% 50% / 50% 50% 50% 50%;
transform: translate3d(75%,-50%,0);
height: 100px;
}
40% {
border-right: 0 solid #3CCC97;
border-radius: 65% 35% 35% 65% / 50% 50% 50% 50%;
height: 90px;
}
50% {
transform: translate3d(0%,-50%,0);
border-left: 25px solid #3CCC97;
border-right: 0 solid #3CCC97;
background: #3CCC97;
border-radius: 50% 50% 50% 50% / 50% 50% 50% 50%;
height: 90px;
}
75% {
border-right: 25px solid #BBBBBB;
border-color: #BBBBBB;
background: #BBBBBB;
border-radius: 35% 65% 65% 35% / 50% 50% 50% 50%;
height: 90px;
}
100% {
border-right: 0 solid #BBBBBB;
border-left: 0 solid #BBBBBB;
border-radius: 50% 50% 50% 50% / 50% 50% 50% 50%;
transform: translate3d(-75%,-50%,0);
height: 100px;
width: 100px
}
}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 is three dark navy circles joined like a cloud, and a bubble knob floats across them, soft and dreamy.
Night mode, sleep apps and whimsical settings.
Change the #243548 cloud colour, the 75px and 150px circle offsets, the 260px width and the bubble styles.
Build a "Cloud bubble toggle" component in plain HTML, CSS and JavaScript (no framework). The track is three dark navy circles joined like a cloud, and a bubble knob floats across them, soft and dreamy. Use it for: Night mode, sleep apps and whimsical settings. Expose these controls: Change the #243548 cloud colour, the 75px and 150px circle offsets, the 260px width and the bubble styles. 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.