<label class="More">
<span class="More-text">More Options Toggle</span>
<input class="More-checkbox" type="checkbox">
<div class="More-dot More-dot--left"></div>
<div class="More-dot More-dot--center">
<svg class="More-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 44 44">
<path d="M4.69,0L22,17.32,39.22,0,44,4.69,26.77,22,44,39.32,39.22,44,22,26.77,4.77,44,0,39.32,17.22,22,0,4.69Z"/>
</svg>
</div>
<div class="More-dot More-dot--right"></div>
</label>
$More-transition-duration: 0.4s;
$More-dot-color: #fff;
$More-icon-color: #3e57ba;
.More {
display: flex;
cursor: pointer;
}
.More-text {
position: absolute;
left: -10000px;
top: auto;
width: 1px;
height: 1px;
overflow: hidden;
}
.More-checkbox {
position: absolute;
top: auto;
left: -10000px;
width: 1px;
height: 1px;
overflow: hidden;
&:checked ~ .More-dot--left::before {
transform: translateX(100%);
}
&:checked ~ .More-dot--right::before {
transform: translateX(-100%);
}
&:checked ~ .More-dot--center {
&::before {
transform: scale(4);
}
&::after {
opacity: 0;
transform: scale(8);
}
}
&:checked ~ .More-dot .More-icon {
opacity: 1;
transform: rotate(0);
}
}
.More-dot {
display: flex;
align-items: center;
justify-content: center;
position: relative;
width: 40px;
height: 40px;
margin: 0 8px;
&::before {
position: absolute;
left: 0;
top: 0;
height: 100%;
width: 100%;
border-radius: 50%;
background: $More-dot-color;
transition: $More-transition-duration transform ease;
content: "";
}
}
.More-dot--center {
&::after {
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
border-radius: 50%;
background: $More-dot-color;
opacity: 1;
transition: $More-transition-duration opacity ease, $More-transition-duration transform ease;
content: "";
}
}
.More-icon {
position: relative;
z-index: 1;
width: 44px;
height: 44px;
opacity: 0;
transition: $More-transition-duration opacity ease, $More-transition-duration transform ease;
transform: rotate(-90deg);
fill: $More-icon-color;
}
*,
*::before,
*::after {
box-sizing: border-box;
}
html,
body {
height: 100%;
}
body {
display: flex;
align-items: center;
justify-content: center;
margin: 0;
background: #3e57ba;
}
View Compiled
/**
* Inspired by Toggle Menu from Andreas Storm
* https://dribbble.com/shots/1945526-Toggle-Menu
*/
View Compiled
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.