Props
| Name | Type | Default | Description |
|---|---|---|---|
adaptive | boolean | undefined | `config.adaptive` (`true`) | Adapt the surface to the viewport: render as a Three-state on purpose: unset falls back to |
description | string | undefined | - | One short line under the title, in the header — the shadcn
|
disabled | boolean | undefined | false | Disable EVERY user-initiated dismissal: backdrop click, Escape AND the
header close (×) button (denied attempts play the deny nudge). Use it
while an operation is in flight (e.g. a save) so the dialog cannot be
dismissed mid-work. Compare It guards dismissal and nothing else — the fields and buttons inside stay live, so disable them yourself while the work is in flight. See example |
eager | boolean | undefined | false | Render dialog content immediately instead of waiting for the first open. Reach for it only when something has to read or measure the body before it has ever been open — a chart, a test, an SSR snapshot. Leaving it off is what keeps a page with many dialogs cheap. See example |
focusTarget | string | undefined | - | CSS selector of the element to focus after opening. Defaults to the first tabbable element. Chooses where focus starts, never whether it is contained: |
fullscreen | boolean | "mobile" | undefined | - | Display the dialog fullscreen. Use Fills the viewport minus the page margin (20px, 14px on mobile) — deliberately not edge to edge. It overrides |
hideClose | boolean | undefined | false | Hide the default close (×) button. The button is shown by default; set this
to remove it (e.g. for a Inverted from v2's |
modelValue | boolean | undefined | false | Used by v-model to open / close the dialog. A dialog with no |
offCanvasProps | Partial<BbOffCanvasProps> | undefined | - | Props for the phone sheet. A Merged last, so it wins over both the forwarded dialog props and the sheet's own defaults. The drawer's edge prop is |
persistent | boolean | undefined | false | Prevent closing via outside clicks or Escape key. The header close (×)
button STILL closes a persistent dialog — that is the documented escape
hatch; combine with Blocks the backdrop and Escape only. The × still closes, by design, so |
pt | PtMap<BbDialogPtPart, BbDialogPtState> | undefined | - | Passthrough, object form: the same keys as the |
pt:close | PtValue | undefined | - | |
pt:close:fullscreen | PtValue | undefined | - | |
pt:close:open | PtValue | undefined | - | |
pt:content | PtValue | undefined | - | |
pt:content:fullscreen | PtValue | undefined | - | |
pt:content:open | PtValue | undefined | - | |
pt:description | PtValue | undefined | - | |
pt:description:fullscreen | PtValue | undefined | - | |
pt:description:open | PtValue | undefined | - | |
pt:footer | PtValue | undefined | - | |
pt:footer:fullscreen | PtValue | undefined | - | |
pt:footer:open | PtValue | undefined | - | |
pt:header | PtValue | undefined | - | |
pt:header:fullscreen | PtValue | undefined | - | |
pt:header:open | PtValue | undefined | - | |
pt:root | PtValue | undefined | - | |
pt:root:fullscreen | PtValue | undefined | - | |
pt:root:open | PtValue | undefined | - | |
pt:sheet | PtValue | undefined | - | |
pt:sheet:fullscreen | PtValue | undefined | - | |
pt:sheet:open | PtValue | undefined | - | |
pt:title | PtValue | undefined | - | |
pt:title:fullscreen | PtValue | undefined | - | |
pt:title:open | PtValue | undefined | - | |
size | Responsive<NonNullable<number | ({ size?: any; } & string) | keyof BbDialogSizes | undefined>> | undefined | "sm" | Controls the maximum width of the dialog. Accepts named presets from A maximum width; the height always hugs the content. The v3 presets are narrower than v2's |
stack | string | undefined | - | Name of the stack this dialog belongs to. Dialogs sharing the same Members of a dialog stack replace one another. The identically named prop on |
title | string | undefined | - | Title text announced to assistive technologies. If omitted, no header is
rendered (unless a The accessible name, not just a heading: it wires |
transitionDuration | number | undefined | 250 | Controls the duration of the open and close animations. Times both the animation and when |
v-model
Values kept in sync through v-model.
| Name | Type | Description |
|---|---|---|
modelValue | boolean | undefined | The only way to open a dialog. There is no exposed |
Events
| Name | Type | Description |
|---|---|---|
hidden | (event: "hidden"): void | Fires after the close transition, |
hide | (event: "hide"): void | |
show | (event: "show"): void | The hook for seeding a draft: it fires as the model turns true, before the open transition, so the fields render already populated. See example |
shown | (event: "shown"): void | |
update:modelValue | (event: "update:modelValue", value: boolean): void |
Slots
The listed properties are the ones exposed to the slot scope.
| Name | Type | Description |
|---|---|---|
default | BbDialogDefaultSlotProps | Primary body content of the dialog, rendered in the scrollable body area. The only region that scrolls, and it renders lazily — nothing inside exists until the first open unless you set |
description | BbDialogDescriptionSlotProps | Replaces the description text under the title. Renders the header even
when |
footer | object | Content rendered in the dialog footer, below the body area. Typically used for action buttons. Stays pinned while the body scrolls. One primary action, aligned to the end, and a Cancel that is never gated on validity. See example |
header | BbDialogHeaderSlotProps | Replaces the entire dialog header section (title + close button) on both
surfaces — the desktop Replaces the header on both surfaces, so it also replaces the ×: render your own control wired to |
title | BbDialogTitleSlotProps | Replaces the default title text inside the header. Remains linked to the
dialog through |
Changes from v2
Props removed or renamed in 3.0. If you are coming from v2, the answer is here.
canvasPropsoffCanvasPropsfails silentlycompactremovedfails silentlyhideHeaderremovedfails silentlyoverlayClassesremovedfails silentlypanelClassesremovedfails silentlyshowClosehideClosefails silently