Hello Nolo,
I’ve made a component to achieve this. I hope it helps
https://github.com/VaperinaDEV/closed-sidebar-by-default