<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
moveBtnWhether to render a move button.booleanfalse
dockThe location in which the dialog should be docked.string'none'
pushTrue if a docked dialog should push the page contents over rather than overlaying.booleanfalse
dockableThe location in which the dialog should be docked.booleanfalse
hide-close-buttonbooleanfalse
backdropOpacitynumber1
heightnumber400
widthnumber400
resizableWhether or not the dialog is resizable.booleanfalse
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
moveBtnmoveBtnWhether to render a move button.booleanfalse
dockdockThe location in which the dialog should be docked.string'none'
pushpushTrue if a docked dialog should push the page contents over rather than overlaying.booleanfalse
dockabledockableThe location in which the dialog should be docked.booleanfalse
hideCloseButtonhide-close-buttonbooleanfalse
backdropOpacitybackdropOpacitynumber1
returnValuestring''
heightheightnumber400
widthwidthnumber400
resizableresizableWhether or not the dialog is resizable.booleanfalse
_dialogInteraction
titletitleThe title shown in the dialog header when open.string''
_dialogHTMLDialogElement
_dragStartXnumber0
_dragStartYnumber0
_dragStartHeightnumber0
_dragStartWidthnumber0
_offsetTopnumber0
_offsetLeftnumber0
_resizeDirection
_onDock
_onUnDock
_onDragMouseUp
_onDragMouseMove
_pushBodySets padding on the element for to compensate for any push enabled docked dialogs.

Methods

NameParametersDescriptionReturn
_getResizeDirection
_handleCloseMimic the HTMLDialogElement close event.
_handleCancelMimic the HTMLDialogElement cancel event.
_keydownHandler
NameDescriptionType
eventEvent
showModalshowModal Shows the dialog as a modal with a background overlay.
showshow Shows the dialog.
closeclose Closes the dialog.
isDockedisDocked True if docked.

Events

NameDescription
close
cancel
open
count-changedIndicates when the count changes

Slots

NameDescription
(default)This element has a slot

CSS Shadow Parts

NameDescription
buttonThe button