Skip to main content

Dialog

Dialog | Dialog with customizable content shadow

The Dialog element displays a dialog box with customizable content. It can be used, for example, to simply display information to the user or to request confirmation or cancellation of an action taken by the user. It is located above the application content and must be manually dismissed by the user in order to continue interacting with the application. The dialog can be displayed in different screen sizes and positions.

Basic Usage

The Button component with the dialog attribute is used to display the Dialog component. For more information, go to Button.

Placement

The placement property specifies the placement of the dialog box on the screen. The default is slide-up. Other options are "stick-up", "fill-in", "slide-left", "slide-right".

Size

The size property adjusts the size of the dialog box on the screen. The default size is "small". Other options are "medium", "large" and "ex-large".

Attributes and Properties

placement

DescriptionSpecifies the location of the dialog box on the screen. Possible values include "slide-up", "slide-down" and others.
Attributeplacement
Type"slide-up" | "slide-down" | "slide-left" | "slide-right" | "fill-in" | string & Record<never, never> | undefined
Defaultslide-up

size

DescriptionSpecifies the size of the dialog box on the screen. Possible values include "small", "medium" and others.
Attributesize
Type"small" | "medium" | "large" | "ex-large" | string & Record<never, never> | undefined
Defaultsmall

Events

No events available for this component.

Methods

No public methods available for this component.

CSS Shadow Parts

NameDescription
bodiesRefers to the main content of the dialog
headerRefers to the header of the dialog box
footerRefers to the footer of the dialog box

CSS Custom Properties

NameDescription
--wj-backdropBackground (backdrop) colour
--wj-backdrop-opacityBackdrop transparency
--wj-dialog-border-colorThe colour of the edges of the dialog box
--wj-dialog-border-radiusRounding the edges of the dialog box
--wj-dialog-border-styleDialog box border style
--wj-dialog-border-widthDialog box border thickness
--wj-dialog-heightHeight of the dialog box
--wj-dialog-margin-bottomBottom outer indent of the dialog window
--wj-dialog-margin-endLeft outer indent of the dialog box
--wj-dialog-margin-startRight outer indent of the dialog box
--wj-dialog-margin-topTop outer indent of the dialog box
--wj-dialog-paddingInternal dialog box indentation
--wj-dialog-widthDialog window width

Slots

NameDescription
headerThe content is placed in the header of the dialog box.
footerThe content is placed in the footer of the dialog box.