JSFiddle - React, Tailwind, and code Playground
HTML
<input type="checkbox" id="ischezayka" aria-hidden="true">
<div class="column">
<label for="ischezayka" class="ischezayka" onclick>→</label>
<span>ololo</span>
</div>
CSS
html, body {
height: 100%;
margin: 0;
padding: 0;
}
.column {
position: fixed;
top: 0;
bottom: 0;
width: 280px;
background: orange;
transform: translateX(-100%);
transition: 0.15s;
}
.ischezayka {
position: absolute;
left: 100%;
top: 50%;
padding: 5px;
background: inherit;
color: white;
cursor: pointer;
font-size: 1em;
}
[id='ischezayka'] {
position: absolute;
clip: rect(0 0 0 0);
opacity: 0;
}
[id='ischezayka']:checked ~ .column {
transform: translateX(0);
}
[id='ischezayka']:checked ~ .column > .ischezayka {
transform: rotate(180deg);
}
@media (max-width: 280px) {
.column {
width: 100%;
}
[id='ischezayka']:checked ~ .column > .ischezayka {
left: auto;
right: 0;
top: 0;
}
}