# Dialog >> Use Cases ||20 `lion-dialog` is a component wrapping a modal dialog controller. Its purpose is to make it easy to use our Overlay System declaratively. ```js script import { html } from '@mdjs/mdjs-preview'; import '@lion/ui/define/lion-dialog.js'; import { demoStyle } from './src/demoStyle.js'; import './src/styled-dialog-content.js'; import './src/slots-dialog-content.js'; ``` ```html
This is a dialog
``` ## Placement overrides ```js preview-story export const placementOverrides = () => { const dialog = placement => { const cfg = { viewportConfig: { placement } }; return html`
Hello! You can close this notification here:
`; }; return html`
${dialog('center')} ${dialog('top-left')} ${dialog('top-right')} ${dialog('bottom-left')} ${dialog('bottom-right')}
`; }; ``` Configuration passed to `config` property: ```js { viewportConfig: { placement: ... // <-- choose a position } } ``` ## Other overrides No backdrop, hides on escape, prevents scrolling while opened, and focuses the body when hiding. ```js preview-story export const otherOverrides = () => { const cfg = { hasBackdrop: false, hidesOnEscape: true, preventsScroll: true, elementToFocusAfterHide: document.body, }; return html`
Hello! You can close this dialog here:
`; }; ``` Configuration passed to `config` property: ```js { hasBackdrop: false, hidesOnEscape: true, preventsScroll: true, elementToFocusAfterHide: document.body } ```