import { Meta, Canvas, Source } from "@storybook/addon-docs"; import * as stories from "./dialog.service.stories"; ```ts import { DialogModule } from "@bitwarden/components"; ``` # Dialog Dialogs are used throughout the app to help the user focus on a specific action. Use the main [Dialog Component](?path=/docs/component-library-dialogs-dialog--docs). when content exceeds 384px width or there are a high number of interactive elements needed. **Example:** The web app's edit vault item form dialog For alerts or simple confirmation actions, like speedbumps, use the [Simple Dialog](?path=/docs/component-library-dialogs-simple-dialog--docs). Dialogs's should be used sparingly as they do call extra attention to themselves and can be interruptive if overused. For non-blocking, supplementary content, open dialogs as a [Drawer](?path=/story/component-library-dialogs-service--drawer) (requires `bit-layout`). ## Placement Dialogs should be centered vertically and horizontally on screen. Dialogs height should expand to fit its content until there are 2rems of margin on the top/bottom of the dialog; in this case, the dialog should become scrollable. A backdrop should be used to hide the content below the dialog. Use `#000000` with `30% opacity`. ## Accessibility ### Component behavior - Dialog include `role="dialog"` - The Dialog title is an `