Skip to content

MazBackdrop

MazBackdrop is a standalone component to manage components that need a backdrop

INFO

Before you have to import the global css files in your project, follow instructions in Getting Started

TIP

This component uses <Teleport to="body">, so you can implement this component anywhere you want

Props, Event & Slots

Props

Prop nameDescriptionTypeValuesDefault
modelValue
@model Modal's model value
boolean-
teleportSelectorTeleport selectorstring-
beforeCloseFunction called before modal is closeTSFunctionType-
persistentPersistent dialog (not closable by clicking outside and remove close button)boolean-
noCloseOnEscKeyPrevent close on escape keyboolean-
transitionNameTransition namestring-
backdropClassBackdrop classTSIndexedAccessType-
backdropContentClassBackdrop content classTSIndexedAccessType-
contentPaddingAdd padding to the contentboolean-
justifyJustify contentunion-
alignAlign contentunion-
variantVariantunion-

Events

Event namePropertiesDescription
openemitted when modal is open
closeemitted when modal is close
update:model-valueemitted when modal is open or close
before-closeemitted before modal is close

Slots

NameDescriptionBindings
defaultPlace your content hereclose Function - close function
on-backdrop-clicked Function - onBackdropClicked function (respects persistent prop)

Expose

onBackdropAnimationEnter

onBackdropAnimationLeave

onBackdropClicked

close

present

toggleModal

onKeyPress