v-modelundefinedBooleanv-model to true to show modal or false to hide it.backdrop (attributes) {}Objectv-backdrop componentbase"modal"Stringclose-button (attributes) {}Objectv-close-button component. See documentation for the valid valuesjustify-buttons"end"String'start', 'end', 'center', 'between', 'around', 'evenly'mod-contentempty stringStringmod-footerempty stringStringmod-headerempty stringStringmod-modalempty stringStringnameempty stringStringno-close-buttonfalseBoolean'X' button in modal headerno-footerfalseBooleantrueno-headerfalseBooleantrueno-primary-buttonfalseBooleanno-secondary-buttonfalseBooleanposition"top"String'top', 'center' or 'bottom'primary-button (attributes) {
"modButton": "variant:primary"
}Objectv-button component. See documentation for the valid valuesprimary-button-closefalseBooleantrue clicking primary button emits the input:secondaryButtonClick event and closes modal. If false modal is not closed after emitting eventprimary-button-label"Accept"Stringsecondary-button (attributes) {
"modButton": "variant:secondary"
}Objectv-button component. See documentation for the valid valuessecondary-button-closefalseBooleantrue clicking primary button emits the input:primaryButtonClick event and closes modal. If false modal is not closed after emitting eventsecondary-button-label"Close"Stringsize"md"String'sm', 'md', 'lg', 'xl' or 'fit'static-backdropfalseBooleantrue modal dialog cannot be closed by clicking outside of ittitleundefinedStringtransition"fade-slide"String'fade', 'fade-slide', 'fade-scale' or empty string to disable animations. Animation speed can be set in the --modal-transition-duration css variable.variantempty stringStringmod-* propsinput:primary-button-clickinput:secondary-button-clickupdate:modelValuev-model of componentinput:static-backdrop-clickstatic-backdrop prop is truemodalv-modal. Slot props: close()headerdefaultfooterTo control modal visibility you can use v-model or v-trigger component
Open modal is by default appended to the body element
Following example uses modal slot to replace all default content for complete customization.
You can also control state of the modal by using v-trigger component. The for prop of the v-trigger should be the same as id of the modal. v-trigger can be anywhere in application.
To configure colors, intensity and others properties of modals backdrop use backdrop prop. See backdrop documentation for possible options.