v-model
undefined
Boolean
v-model
to true
to show modal or false
to hide it.backdrop (attributes)
{}
Object
v-backdrop
componentbase
"modal"
String
close-button (attributes)
{}
Object
v-close-button
component. See documentation for the valid valuesjustify-buttons
"end"
String
'start'
, 'end'
, 'center'
, 'between'
, 'around'
, 'evenly'
mod-content
empty string
String
mod-footer
empty string
String
mod-header
empty string
String
mod-modal
empty string
String
name
empty string
String
no-close-button
false
Boolean
'X'
button in modal headerno-footer
false
Boolean
true
no-header
false
Boolean
true
no-primary-button
false
Boolean
no-secondary-button
false
Boolean
position
"top"
String
'top'
, 'center'
or 'bottom'
primary-button (attributes)
{
"modButton": "variant:primary"
}
Object
v-button
component. See documentation for the valid valuesprimary-button-close
false
Boolean
true
clicking primary button emits the input:secondaryButtonClick
event and closes modal. If false
modal is not closed after emitting eventprimary-button-label
"Accept"
String
secondary-button (attributes)
{
"modButton": "variant:secondary"
}
Object
v-button
component. See documentation for the valid valuessecondary-button-close
false
Boolean
true
clicking primary button emits the input:primaryButtonClick
event and closes modal. If false
modal is not closed after emitting eventsecondary-button-label
"Close"
String
size
"md"
String
'sm'
, 'md'
, 'lg'
, 'xl'
or 'fit'
static-backdrop
false
Boolean
true
modal dialog cannot be closed by clicking outside of ittitle
undefined
String
transition
"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.variant
empty string
String
mod-*
propsinput:primary-button-click
input:secondary-button-click
update:modelValue
v-model
of componentinput:static-backdrop-click
static-backdrop
prop is true
modal
v-modal.
Slot props: close()
header
default
footer
To 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.