Enabling binary conditions using Webflow variables and local storage

I was inspired by Timothy Rick’s dark / light mode implementation: and want to know how I could add another binary state. I am trying to make a sidebar that opens and closes based on Webflow’s variables - define the dimensions of elements and define show and hide properties to local storage such that when users move on to a different page the open/closed state of the sidebar persists. This seems like the next level of complexity that can be achieved. Would love to hear anyone else’s thoughts!


Here is my site Read-Only: LINK
(how to share your site Read-Only link)

I’m currently designing an SA5 State toolkit which handles state management for UX personalization, referrer tracking, etc. However it’s not released to the public yet.

SA5 Track is, which has some similar features;

Also have a look at Alpine.js which is not Webflow-specific but is primarily attribute-based.

https://alpinejs.dev/