When I enable the sidebar navigation, the sidebar shows by default and the first time a user clicks the menu icon, it will hide the sidebar.
Can I reverse this setup, so the landing page shows in full width on initial page load and when a user clicks the menu icon it will reveal the sidebar?
This is somewhat similar as the sidebar seems to be controlled by
Thanks for sharing this! That would be this approach:
Which effects the sidebar to slide to the hidden state. So there’s an automatic animation on document ready which is not that ideal.
I actually also thought that the sidebar is controlled by the aria attribute, so I had tried this:
But the attribute is not controlling the state, it’s only indicating it. So that snippet will change the attribute, but not the state
I’ve made a component to achieve this. I hope it helps
Oh yes that helps indeed! That’s what I fumbled with but couldn’t get it to work…
Thanks so much for sharing @dodesz
Thank you, Don! It’s brilliant!
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.