Trigger offcanvas by click on standard button element


I’m using the 1.8 beta and trying out the offcanvas element. However, I can’t figure out how to trigger the offcanvas element using another element than the trigger element. I want to trigger it via a standard button element. Is this possible at the moment?


Use button element design as you need.

Assign class .brxe-toggle, then add attributes: aria-label=“Open” aria-expanded=“false”, data-selector=“#offcanvas_id”.

Then you should be good to go.

1 Like

Thanks a lot Martin, this works a treat! Guess I was to lazy to inspect the code myself :smiley:

Hopefully this will be implemented in the same way popups can be triggered from an interaction.