# Modal
# Demo
<button
class="btn btn-primary"
@click="showModal = true"
>
Show modal
</button>
<modal
title="Hello world!"
v-model="showModal"
@closed="showModal = false"
>
This is the body.
</modal>
# Props
value | Type Default
Description
Used to open or close the modal |
title | Type Default
Description
Title of the modal |
body | Type Default
Description
The body (content) of the modal |
id | Type
Description
The id attribute of the modal
|
header | Type Default
Description
Controls visibility of the header |
header-close-button | Type Default
Description
Controls visibility of the close button in the header |
footer | Type Default
Description
Controls visibility of the footer |
confirm-button | Type Default
Description
Controls visibility of the "Confirm" button |
confirm-button-label | Type Default
Description
"Confirm" button label |
close-on-confirm | Type Default
Description
Close the modal on "Confirm" button click? |
close-button | Type Default
Description
Controls visibility of the "Close" button |
close-button-label | Type Default
Description
"Close" button label |
# Events
opened | Parameters Description Emitted when the modal gets opened |
closed | Parameters Description Emitted when the modal gets closed |
confirmed | Parameters Description Emitted on "Confirm" button click |