<mercury-dialog>

A web component just for me.

API

<mercury-dialog>

An example element.

Attributes

NameDescriptionTypeDefault
openWhether the dialog should be open or not.booleanfalse
modalWhether the dialog should be treated as a modal with a backdrop.booleanfalse
moveableWhether the dialog should be moveable.booleanfalse
dockThe location in which the dialog should be docked.string'none'
closeButtonbooleantrue
backdropOpacitynumber1
titleThe title shown in the dialog header when open.string''

Properties

NameAttributeDescriptionTypeDefault
openopenWhether the dialog should be open or not.booleanfalse
modalmodalWhether the dialog should be treated as a modal with a backdrop.booleanfalse
moveablemoveableWhether the dialog should be moveable.booleanfalse
dockdockThe location in which the dialog should be docked.string'none'
closeButtoncloseButtonbooleantrue
backdropOpacitybackdropOpacitynumber1
titletitleThe title shown in the dialog header when open.string''
_dialogHTMLDialogElement
_dragStartXnumber0
_dragStartYnumber0
_offsetTopnumber0
_offsetLeftnumber0
_onDragMouseUp
_onMouseMove

Methods

NameParametersDescriptionReturn
showModalshowModal Shows the dialog as a modal with a background overlay.
showshow Shows the dialog.
closeclose Closes the dialog.

Events

NameDescription
count-changedIndicates when the count changes

Slots

NameDescription
(default)This element has a slot

CSS Shadow Parts

NameDescription
buttonThe button