Bootstrap 5 offcanvas is used to make hidden sidebars within the project for navigation.
Steps to create bootstrap 5 Offcanvas:
data-bs-targetattribute. In both cases, use the data-bs-toggle="offcanvas".Please keep in mind that
data-bs-targetcontains the offcanvas container id preceded by hash character(#).
.offcanvasfollowed by one of the (
.offcanvas-bottom)to the offcanvas container and also assign unique id to offcanvas container.
.offcanvas-headerOffcanvas header container and place offcanvas header title and assign
.offcanvas-titleand also place
<button>and assign data attribute
Note:Follow the above mention process to make bootstrap 5 offcanvas component.