Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Custom postion for v-dialog Vuetify

Tags:

vuetify.js

I need to open a v-dialog of certain width and height on right bottom side of my page, but, I can't understand how to do. V-dialog always are centered on the page, I searched on official doc, tried use CSS, but wasn't able any ideas?

like image 367
enrik00 Avatar asked Nov 21 '18 15:11

enrik00


2 Answers

Note: Other provided solutions are not satisfying because they mess up transitions, or we can't use scoped-styles, or they suggest using !important etc.

Solution

Add arbitrary content-class class to your dialog:

<v-dialog content-class="my-custom-dialog">

Then we can use scoped styles:

<style scoped>
  >>> .my-custom-dialog {
    align-self: flex-end;
  }
</style>
like image 93
Traxo Avatar answered Nov 06 '22 11:11

Traxo


This feature is being looked at but for now you can use edit the CSS class yourself. For instance, to get it to display in the bottom right use:

.v-dialog {
    position: absolute;
    bottom: 0;
    right: 0;
}
like image 7
soupjake Avatar answered Nov 06 '22 10:11

soupjake