Like others, I am having issue with my off canvas after upgrading to 6.0.0. Seemed to be working fine using the beta, but today it stopped after the update. I saw the other posts and have checked the following;
Using Bootstrap 5 local, v5.3.2, and my js file is 5.3.2
Made sure the off canvas is out of the main content
Toggled between bootstrap 5 cdn and local - no change
Made sure all frameworks, extensions were up-to-date
Toggled beta channel on/off
It worked correctly earlier, no code changes other than the update.
So, like I said it just stopped displaying after the update. I have it on a layout page for left side navigation. It is supposed to default to visible on more than 992 pix, hidden on smaller.
I should not have to change any code if it was working on the beta right? What else do I need to look for?
The offcanvas element is not shown by default on page load. You either need to open it using a dynamic event or add a .show class to it in order to be visible on page load.
I think I have found the issue. For anyone having issues with Off Canvas in Bootstrap 5.2.3 coming from Bootstrap 5.1, the visibility class has changed. Here is what I found:
Responsive offcanvas
Offcanvas component now has responsive variations. The original .offcanvas class remains unchanged—it hides content across all viewports. To make it responsive, change that .offcanvas class to any .offcanvas-{sm|md|lg|xl|xxl} class.
I changed the class on mine and it works now.
From this: