01
Basic dialog
The default. A native <dialog> with header, body and footer — focus trapping and Escape come from the browser.
02
Scrollable dialog
.dialog-scrollable keeps the header and footer fixed while only the body scrolls, so the actions never leave the screen.
03
Sizes & fullscreen
.dialog-sm through .dialog-xl, plus .dialog-fullscreen for the takeover pattern.
04
Form dialog
A form inside a dialog, submitted from the footer using form= so the button can live outside the form element.
05
Destructive confirm
data-bs-static stops a backdrop click dismissing it, so a destructive action needs a deliberate answer.
06
Non-modal dialog
.dialog-nonmodal has no backdrop and leaves the page usable underneath — impossible with a v5 modal.
07
Drawers, four sides
.drawer-start, -end, -top and -bottom. Offcanvas is gone; a drawer is a <dialog> too.
08
Bottom sheet
.drawer-sheet with .drawer-fit-content — the mobile sheet pattern, sized to its content.
09
Toasts
Stacked notifications in a .toast-container, including the translucent variant. Markup plus a class, no component to construct.
10
Entry animations
.dialog-slide-up, .dialog-slide-down and .dialog-instant — and why the last one matters.
Porting from v5
The renames are the easy part: Modal is
Dialog, Offcanvas is Drawer, and
the data attributes follow — data-bs-toggle="dialog",
data-bs-dismiss="drawer". There is no
window.bootstrap global any more either; v6 is ESM-only, so
the script tag needs type="module".
The mistake everyone makes
Both components must be actual <dialog> elements. A
<div class="dialog"> or
<div class="drawer"> will style correctly, look
finished, and never open. Nothing is logged. If a drawer div also sits
inside a navbar-expand ancestor, its contents render inline
on desktop, which usually shows up as a navigation menu appearing twice.
What you get for free
The top layer, so no z-index conflicts with sticky headers. Focus trapping while open and focus restored to the trigger on close. Escape to dismiss. Content behind marked inert. All of that was hand-rolled JavaScript in v5.
What is genuinely new
.dialog-nonmodal has no v5 equivalent — a dialog with no
backdrop that leaves the page interactive underneath, for inspectors and
help panels. .drawer-sheet with
.drawer-fit-content gives you the mobile bottom-sheet
pattern without writing any of it. And
.dialog-instant lets you skip the entry animation where it
would read as lag.