Build hidden sidebars into your project for navigation, shopping carts, and more with a few classes and our JavaScript plugin.
Offcanvas on Bootstrap
You can trigger an offcanvas using a link with
href
or a button with
data-bs-target
, but both must include
data-bs-toggle="offcanvas"
.
When an offcanvas and its backdrop are visible,
<body>
scrolling is disabled. Use
data-bs-scroll
to enable scrolling and
data-bs-backdrop
to control the backdrop visibility.
.offcanvas-start
positions the offcanvas on the left,
.offcanvas-end
on the right,
.offcanvas-top
displays it from the top, and
.offcanvas-bottom
displays it from the bottom of the viewport.
Customize the look of offcanvases using utility classes to suit different themes, such as dark navbars. Add
.text-bg-dark
to
.offcanvas
and
.btn-close-white
to
.btn-close
for dark styling.
Easily configure layout, styles, and preferences for your admin interface.