← All dialogs Bottom sheet 8 of 10
‹ ›

Bottom sheet

Rounded top corners, sized to its content rather than the viewport.

.drawer-fit-content stops a short sheet stretching to full height. Pair it with .drawer-sheet for the rounded top edge that signals the thing is draggable-looking even though it is not.

Share

Choose a plan

Bootstrap 6 renders dialogs and drawers as native <dialog> elements. That means the browser puts them in the top layer, so they sit above every stacking context on the page without a z-index arms race.

It also means focus is trapped for you, Escape closes by default, and the rest of the page is inert while the dialog is open — three things that took a surprising amount of JavaScript in v5.

The trade is that the markup must actually be a <dialog>. A div with class="dialog" will style correctly and then never open, which is the single most common mistake when porting from v5.

Drawers are the same element with a different class. There is no separate offcanvas component any more, and no separate JavaScript for it either.