← All dialogs Sizes & fullscreen 3 of 10
‹ ›

Sizes

Four widths and a fullscreen takeover.

Fullscreen is the right call for anything that is really a page in disguise — an editor, a media picker, a multi-step flow. If a visitor could reasonably want to deep-link to it, it should be a route instead.

Small

Good for a single confirmation.

Default

The default width suits most content.

Large

Room for a form in two columns.

Extra large

For tables and side-by-side comparisons.

Fullscreen

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.