Opening Bricks Offcanvas with a Custom Link or Button

Bricks comes with two elements that are typically used for setting up full-height Offcanvas sliding menus: Offcanvas and Toggle.

Toggle adds a hamburger menu icon which when clicked slides open the Offcanvas.

Sometimes you may want to trigger the Offcanvas with a text link or a Button element.

All you need to do for that is add the class of brxe-toggle to your custom link/button.

The class can be added either in the active class input or STYLE → CSS → CSS classes.

I prefer the latter since there is no risk of accidentally generating any unwanted styling for that class.

Instant access to 390+ Bricks code tutorials with BricksLabs Pro


  • when I add the class .brxe-toggle to a text-link, the offcanvas closes smoothly but the link does not take me to the corresponding page.

    • A

      I think that is the expected behavior. You want the link to either take the user to the set URL or launch a modal/offcanvas.

Leave your comment