# Interaction >> Dialog >> Features ||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/dialog/define'; import { demoStyle } from './src/demoStyle.js'; import './src/styled-dialog-content.js'; import './src/slots-dialog-content.js'; ``` ```html
This is a dialog
``` ## Styling content It's not possible to style content from the dialog component. This is because the content slot is moved to the global root node. This is why a custom component should be created and slotted in as the content. This ensures style encapsulation on the dialog content. ```js preview-story export const stylingContent = () => html` `; ``` ## Content with slots ```js preview-story export const slotsContent = () => html`

Some Stuff

I am in the actions slot

`; ``` ## Close overlay from component slotted as content The overlay cannot be closed by dispatching the `close-overlay` from a button in a styled component that is slotted in as content, because it will not cross the shadow boundary of the component. A method should be created that will dispatch the `close-overlay` event from the component. ```js preview-story export const closeOverlayFromComponent = () => html` `; ``` ## Placement overrides ```js preview-story export const placementOverrides = () => { const dialog = placement => 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 = () => html`
Hello! You can close this dialog here:
`; ``` Configuration passed to `config` property: ```js { hasBackdrop: false, hidesOnEscape: true, preventsScroll: true, elementToFocusAfterHide: document.body } ```