Skip to main content

Dialog

<sc-dialog></sc-dialog>

This component let users create dialog.

OpenContent

Component Codex

Properties

PropertyDescriptionTypeDefault
labelThe dialog's label as displayed in the header. You should always include a relevant label even when using `no-header`, as it is required for proper accessibility.string''
noHeaderDisables the header. This will also remove the default close button, so please ensure you provide an easy, accessible way for users to dismiss the dialog.booleanfalse
openIndicates whether or not the dialog is open. You can use this in lieu of the show/hide methods.booleanfalse

Events

EventDescriptionType
scAfterHideCustomEvent<void>
scAfterShowCustomEvent<void>
scHideCustomEvent<void>
scInitialFocusCustomEvent<void>
scRequestCloseRequest close eventCustomEvent<"close-button" | "keyboard" | "overlay">
scShowCustomEvent<void>

Shadow Parts

PartDescription
base
body
close-button
footer
header
overlay
panel
title