Dialog

The v-dialog component inform users about a specific task and may contain critical information, require decisions, or involve multiple tasks. Use dialogs sparingly because they are interruptive.

If you want to programmatically open or close the dialog, you can do so by using v-model with a boolean value. Keep in mind, if the trigger for the opening is not contained within the activator slot and is done so by a click, you must stopPropagation to avoid immediately triggering a close event.

 <v-dialog v-model="dialog" width="500" >
<template v-slot:activator="{ on }">
<v-btn color="red lighten-2" dark v-on="on"> Click Me </v-btn>
</template>
<v-card>
<v-card-title class="headline grey lighten-2" primary-title>
Privacy Policy
</v-card-title>
<v-card-text>
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
</v-card-text>
<v-divider></v-divider>
<v-card-actions>
<div class="flex-grow-1"></div>
<v-btn color="primary" text @click="dialog = false" >
I accept
</v-btn>
</v-card-actions>
</v-card>
</v-dialog>
Last Updated 5 years ago
Generic selectors
Exact matches only
Search in title
Search in content
Search in posts
Search in pages