Porsche Design SystemSearchNavigate to GitHub repository of Porsche Design SystemOpen sidebar
ConfiguratorExamplesUsageAccessibilityAPI
Modal Table of ContentsPropertiestype BreakpointCustomizable<T> = { base: T; xs?: T; s?: T; m?: T; l?: T; xl?: T; xxl?: T; };PropertyAttributeDescriptionTypeDefaultaria ariaAdd ARIA attributes.type ModalAriaAttribute = {
  'aria-label'?: string;
  'role'?: string;
}
undefined
backdrop backdropDefines the backdrop, 'blur' (should be used when Modal is opened by user interaction, e.g. after a click on a button) and 'shading' (should be used when Modal gets opened automatically, e.g. Cookie Consent).type ModalBackdrop =
'blur'
'shading'
'blur'
disableBackdropClick disable-backdrop-clickIf true, the modal will not be closable via backdrop click.booleanfalsedisableCloseButton 🚫disable-close-buttonIf true, the modal will not have a dismiss button. deprecated since v3.0.0, will be removed with next major release, use dismissButton instead.booleanundefineddismissButton dismiss-buttonIf false, the modal will not have a dismiss button.booleantruefullscreen 🛠fullscreenIf true the modal uses max viewport height and width. Should only be used for mobile.boolean
BreakpointCustomizable<boolean>
false
heading 🚫headingdeprecated since v3.0.0, will be removed with next major release, use header slot instead The title of the modalstringundefinedopen openIf true, the modal is open.booleanfalsetheme themeAdapts the modal color depending on the theme.type Theme =
'light'
'dark'
'auto'
'light'
EventsEventDescriptionTypeclose 🚫deprecated since v3.0.0, will be removed with next major release, use dismiss event instead. Emitted when the component requests to be dismissed.CustomEvent<void>dismiss Emitted when the component requests to be dismissed.CustomEvent<void>motionHiddenEnd Emitted when the modal is closed and the transition is finished.type ModalMotionHiddenEndEventDetail = TransitionEvent
CustomEvent<ModalMotionHiddenEndEventDetail>
motionVisibleEnd Emitted when the modal is opened and the transition is finished.type ModalMotionVisibleEndEventDetail = TransitionEvent
CustomEvent<ModalMotionVisibleEndEventDetail>
SlotsSlotDescriptionisRequiredaltPropallowedTagNames<slot name="heading"> 🚫Renders a heading section above the content area.<slot name="header"> Renders a header section above the content area.<slot> Default slot for the main content.<slot name="footer"> Shows a sticky footer section, flowing under the content area when scrollable.CSS VariablesCSS VariableDescriptiondefaultValue--p-modal-width Width of the modal.auto--p-modal-spacing-top Spacing of the modal to the top.clamp(16px, 10vh, 192px)--p-modal-spacing-bottom Spacing of the modal to the bottom.clamp(16px, 10vh, 192px)
Global settingsThemeChanges the theme of the application and any Porsche Design System component. It's possible to choose between forced theme light and dark. It's also possible to use auto, which applies light or dark theme depending on the operating system settings automatically.LightDarkAuto (sync with operating system)DirectionChanges the direction of HTML elements, mostly used on<html> tag to support languages which are read from right to left like e.g. Arabic.LTR (left-to-right)RTL (right-to-left)AutoText ZoomChanges the text size and values with unit rem or em relatively. This setting can be defined in browser settings for any website or by an application itself on<html> tag. To achieve WCAG 2.2 AA compliance it's obligatory to support text zoom up to at least 200%.100%130%150%200%