# API

## <mercury-dialog>

An example element.

### Attributes

Name | Description | Type | Default
--- | --- | --- | ---
open | Whether the dialog should be open or not. | boolean | false
modal | Whether the dialog should be treated as a modal with a backdrop. | boolean | false
moveable | Whether the dialog should be moveable. | boolean | false
dock | The location in which the dialog should be docked. | string | 'none'
closeButton |  | boolean | true
backdropOpacity |  | number | 1
title | The title shown in the dialog header when open. | string | ''

### Properties

Name | Attribute | Description | Type | Default
--- | --- | --- | --- | ---
open | open | Whether the dialog should be open or not. | boolean | false
modal | modal | Whether the dialog should be treated as a modal with a backdrop. | boolean | false
moveable | moveable | Whether the dialog should be moveable. | boolean | false
dock | dock | The location in which the dialog should be docked. | string | 'none'
closeButton | closeButton |  | boolean | true
backdropOpacity | backdropOpacity |  | number | 1
title | title | The title shown in the dialog header when open. | string | ''
_dialog |  |  | HTMLDialogElement |
_dragStartX |  |  | number | 0
_dragStartY |  |  | number | 0
_offsetTop |  |  | number | 0
_offsetLeft |  |  | number | 0
_onDragMouseUp |  |  |  |
_onMouseMove |  |  |  |

### Methods

Name | Parameters | Description | Return
--- | --- | --- | ---
showModal |  | showModal Shows the dialog as a modal with a background overlay. |
show |  | show Shows the dialog. |
close |  | close Closes the dialog. |

### Events

Name | Description
--- | ---
count-changed | Indicates when the count changes

### Slots

Name | Description
--- | ---
(default) | This element has a slot

### CSS Shadow Parts

Name | Description
--- | ---
button | The button