@microsoft/fast-foundation > Dialog
Dialog class
A Switch Custom HTML Element. Implements the ARIA dialog.
- The default slot for the dialog content
positioning-region - A wrapping element used to center the dialog and position the modal overlay
overlay - The modal dialog overlay
control - The dialog element
cancel - Fires a custom 'cancel' event when the modal overlay is clicked
close - Fires a custom 'close' event when the dialog is hidden
Signature:export declare class Dialog extends FoundationElement
Properties
Property | Modifiers | Type | Description |
---|---|---|---|
ariaDescribedby | string | The id of the element describing the dialog. | |
ariaLabel | string | The label surfaced to assistive technologies. | |
ariaLabelledby | string | The id of the element labeling the dialog. | |
hidden | boolean | The hidden state of the element. | |
modal | boolean | Indicates the element is modal. When modal, user mouse interaction will be limited to the contents of the element by a modal overlay. Clicks on the overlay will cause the dialog to emit a "dismiss" event. | |
trapFocus | boolean | Indicates that the dialog should trap focus. |
Methods
Method | Modifiers | Description |
---|---|---|
hide() | The method to hide the dialog. | |
show() | The method to show the dialog. |