Bootstrap Home

Offcanvas

Placement

Heading

Some text lorem ipsum.

Some text lorem ipsum.

Some text lorem ipsum.

Left Offcanvas

The following example shows how to create an offcanvas sidebar.


Heading

Some text lorem ipsum.

Some text lorem ipsum.

Some text lorem ipsum.

Right Offcanvas

The .offcanvas-end class positions the offcanvas to the right of the page.


Heading

Some text lorem ipsum.

Top Example

The .offcanvas-top class positions the offcanvas at the top of the page.


Heading

Some text lorem ipsum.

Bottom Example

The .offcanvas-bottom class positions the offcanvas at the bottom of the page.


Heading

Some text lorem ipsum.

Dropdown Example

Dropdown buttons may be included in the offcanvas area.


Heading

Some text lorem ipsum.

Backdrop

No Close On Click Backdrop

By default, the offcanvas will render with a backdrop that dismisses the offcanvas on click. Set backdrop=false to maintain the canvas, when clicking away.


Enable Body Scrolling

By default, scrolling the <body> element is disabled when an offcanvas and its backdrop are visible. This property can be reversed with data-bs-scroll="true".


Enable Body Scrolling And No Close On Click Backdrop

Both the body can be scrolled and the offcanvas can persist, after clicking back onto the body.