Nest each DialogStackLevel inside the content of the level below it.
workspace-settings.tsx
DialogStack
DialogStackLevel
| Prop | Type | Default | Description | |||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| label | string | — | The short name of this level in the path of the levels above it ("Remove member"). | |||||||||||||||||||||||||||||||||||||||||
| size | "default""lg""sm""xl" | "default" | The width of the level (the Dialog sizes). A level is never wider than the level below it, so a wider size on top falls back to the size below. Default default (448px). | |||||||||||||||||||||||||||||||||||||||||
From Base UIDialog.RootBase UI docs | ||||||||||||||||||||||||||||||||||||||||||||
| open | boolean | — | Whether the dialog is currently open. | |||||||||||||||||||||||||||||||||||||||||
| default | boolean | false | Whether the dialog is initially open. To render a controlled dialog, use the open prop instead. | |||||||||||||||||||||||||||||||||||||||||
| modal | "trap-focus" | boolean | true | Determines if the dialog enters a modal state when open. - true: user interaction is limited to just the dialog: focus is trapped, document page scroll is locked, and pointer interactions on outside elements are disabled. - false: user interaction with the rest of the document is allowed. - 'trap-focus': focus is trapped inside the dialog, but document page scroll is not locked and pointer interactions outside of it remain enabled. When modal is true or 'trap-focus', render <Dialog.Close> inside <Dialog.Popup> so touch screen readers can escape the popup. | |||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||
DialogStackTrigger
<button>| Prop | Type | Default | Description | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| class | string | — | |||||||||||||||||||
From Base UIDialog.TriggerBase UI docs | |||||||||||||||||||||
| handle | DialogHandle<Payload> | — | A handle to associate the trigger with a dialog. Can be created with the Dialog.createHandle method. | ||||||||||||||||||
| payload | Payload | — | A payload to pass to the dialog when it is opened. | ||||||||||||||||||
| id | string | — | ID of the trigger. In addition to being forwarded to the rendered element, it is also used to specify the active trigger for the dialog in controlled mode (with the DialogRoot triggerId prop). | ||||||||||||||||||
| |||||||||||||||||||||
| ...props | <button> attributes | — | Every other attribute goes to the <button>, with a ref. | ||||||||||||||||||
DialogStackContent
<div>| Prop | Type | Default | Description |
|---|---|---|---|
| class | string | — | |
| backdrop | boolean | — | Dim the page under the dialog (Base UI Dialog.Backdrop). Default true. |
| show | boolean | — | Show the close button (a 24px ghost icon button) in the top end corner. Default true. |
| portal | — | Other Base UI props of the inner parts. A className here adds to the component classes. | |
| backdrop | DialogOverlayProps | — | |
| viewport | — | ||
| close | — | ||
| scroll | "inside""outside" | — | |
From Base UIDialog.PopupBase UI docs | |||
| initial | — | Determines the element to focus when the dialog is opened. By default, focus moves to the first tabbable element inside the popup, except when the dialog is opened by touch — then the popup itself is focused to avoid opening the virtual keyboard. - false: Do not move focus. - true: Move focus based on the default behavior (first tabbable element or popup). - RefObject: Move focus to the ref element. - function: Called with the interaction type (mouse, touch, pen, or keyboard). Return an element to focus, true to use the default behavior, null to fall back to the default behavior, or false/undefined to do nothing. | |
| final | — | Determines the element to focus when the dialog is closed. - false: Do not move focus. - true: Move focus based on the default behavior (trigger or previously focused element). - RefObject: Move focus to the ref element. - function: Called with the interaction type (mouse, touch, pen, or keyboard). Return an element to focus, true to use the default behavior, null to fall back to the default behavior, or false/undefined to do nothing. | |
| container | — | A parent element to render the portal element into. | |
| ...props | <div> attributes | — | Every other attribute goes to the <div>, with a ref. |
DialogStackNav
<div>| Prop | Type | Default | Description |
|---|---|---|---|
| ...props | <div> attributes | — | Every other attribute goes to the <div>, with a ref. |
DialogStackBack
<button>| Prop | Type | Default | Description |
|---|---|---|---|
| class | string | — | |
| busy | boolean | — | The button waits for the app (busy words): a spinner, aria-busy, and no clicks. Focus stays on the button. The style hook stays data-loading. |
| spinner | "center""start" | — | center (default): the spinner covers the label. start: it takes the leading icon slot. The icon sizes always use center, because their one icon is the label. |
| glass | "clear""dark""light" | — | |
| rounded | "default""full" | — | |
| size | "default""icon""icon-lg""icon-sm""icon-xs""lg""sm""xl""xs" | — | |
| variant | "dashed""default""destructive""destructive-outline""ghost""link""media""outline""secondary" | "outline" | |
From Base UIButtonBase UI docs | |||
| focusable | boolean | false | Whether the button should be focusable when disabled. |
| style | — | Style applied to the element, or a function that returns a style object based on the component's state. | |
| ...props | <button> attributes | — | Every other attribute goes to the <button>, with a ref. |
DialogStackPath
<nav>| Prop | Type | Default | Description |
|---|---|---|---|
| ...props | <nav> attributes | — | Every other attribute goes to the <nav>, with a ref. |
DialogStackShortcut
<div>DialogStackDepth
<p>| Prop | Type | Default | Description |
|---|---|---|---|
| ...props | <p> attributes | — | Every other attribute goes to the <p>, with a ref. |
DialogStackGuard
<div>| Prop | Type | Default | Description |
|---|---|---|---|
| class | string | — | |
| portal | — | Other Base UI props of the inner parts. A className here adds to the component classes. | |
| backdrop | AlertDialogOverlayProps | — | |
| viewport | — | ||
| size | "default""sm" | "sm" | |
| when | boolean | — | The level has unsaved changes: every close by the person asks first. |
| children | ReactNode | — | The question. Default: "Discard your changes?" with Keep editing and Discard. |
From Base UIDialog.PopupBase UI docs | |||
| initial | — | Determines the element to focus when the dialog is opened. By default, focus moves to the first tabbable element inside the popup, except when the dialog is opened by touch — then the popup itself is focused to avoid opening the virtual keyboard. - false: Do not move focus. - true: Move focus based on the default behavior (first tabbable element or popup). - RefObject: Move focus to the ref element. - function: Called with the interaction type (mouse, touch, pen, or keyboard). Return an element to focus, true to use the default behavior, null to fall back to the default behavior, or false/undefined to do nothing. | |
| final | — | Determines the element to focus when the dialog is closed. - false: Do not move focus. - true: Move focus based on the default behavior (trigger or previously focused element). - RefObject: Move focus to the ref element. - function: Called with the interaction type (mouse, touch, pen, or keyboard). Return an element to focus, true to use the default behavior, null to fall back to the default behavior, or false/undefined to do nothing. | |
| container | — | A parent element to render the portal element into. | |
| ...props | <div> attributes | — | Every other attribute goes to the <div>, with a ref. |
DialogStackGuardDiscard
<button>| Prop | Type | Default | Description | ||||
|---|---|---|---|---|---|---|---|
| glass | "clear""dark""light" | — | |||||
| rounded | "default""full" | — | |||||
| size | "default""icon""icon-lg""icon-sm""icon-xs""lg""sm""xl""xs" | — | |||||
| variant | "dashed""default""destructive""destructive-outline""ghost""link""media""outline""secondary" | "destructive" | |||||
| class | string | — | |||||
| busy | boolean | — | The button waits for the app (busy words): a spinner, aria-busy, and no clicks. Focus stays on the button. The style hook stays data-loading. | ||||
| spinner | "center""start" | — | center (default): the spinner covers the label. start: it takes the leading icon slot. The icon sizes always use center, because their one icon is the label. | ||||
From Base UIButtonBase UI docs | |||||||
| focusable | boolean | false | Whether the button should be focusable when disabled. | ||||
| render | — | Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a ReactElement or a function that returns the element to render. | |||||
| style | — | Style applied to the element, or a function that returns a style object based on the component's state. | |||||
| |||||||
| ...props | <button> attributes | — | Every other attribute goes to the <button>, with a ref. | ||||
| Escape | Closes the top level and moves focus back to its trigger. A level with unsaved edits asks first. |
|---|---|
| AltLeft | Closes the top level when focus is not in a text field. |
| Tab | Moves focus inside the top level only. |
Built with
Installs with Dialog Stack
- Components
- Alert Dialog,Badge,Breadcrumb,Button,Dialog,Kbd







