Skip to content

BasePopUp

A component as overlay to display messages

Props

Prop nameDescriptionTypeValuesDefault
titlepop up header textstring-'Pop Up'
headerIdcustomize the popup header id.
if you are using the header-title slot this should also be set as id on your custom title element
string|number-'popup-title'
descriptionElementIdspecify the id of the element containing a description - for accessibility onlystring-''
buttonLeftTexttext shown in left buttonstring-'Cancel'
buttonRightTexttext shown in right buttonstring-'Submit'
buttonLeftIconicon shown in left buttonstring-'remove'
buttonRightIconicon shown in right buttonstring-'check-mark'
buttonRightDisableddisable right buttonboolean-false
closeButtonDisableddisable close buttonboolean-false
isLoadingif true button loader will be shownboolean-false
initialFocusElementHTMLElement to focus after opening the popup
Note: If empty, the header title will be focused by default.
If using the slot for a custom header, be sure to
define an id attribute with the value popup-title
The value should be a valid CSS selector.
useful IDs:
- left-button: popup-left-button
- right-button: popup-right-button
string-''
fullscreenOnMobilespecify to render component with max height and widthboolean-false
focusableElementslist of focusable HTML elements using tab key navigationarray-['a[href]', 'button:enabled', 'input:enabled', '*[tabindex]:not([tabindex="-1"])']
disableTabKeyHandlerspecify to disable the tab key handler within the componentboolean-false
showButtonRowbutton row visibilityboolean-true
overlayBackgroundVisibledefine if the overlay background should be visible
(semitransparent black)
boolean-false

Events

Event namePropertiesDescription
button-leftEvent triggered with left button
button-rightEvent triggered with right button
closeEvent triggered on right top corner close action

Slots

NameDescriptionBindings
header-titleadd a custom header title instead of the text defined with the prop title.header-id string, number - set this id on your custom element as it is used by the aria-labelledby attribute of the pop up container
defaultslot to fill the body of the box with custom content
button-rowcustom button row

Demo

A basic example