-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature Request] Add customization to v-dialog overlay 2.0 #8301
[Feature Request] Add customization to v-dialog overlay 2.0 #8301
Comments
+1 for this. My workaround :
Depending on your implementation of the dialog, you might need to use the v-model="dialog" on v-overlay aswel. |
There was no way to control the opacity or color of the overlay on VBottomSheet, VDialog and VNavigationDrawer and the overlayable mixin was apparently only used for the hide-overlay prop. This adds overlay-color and overlay-opacity props. Also added the translation strings file for the mixin and adjusted component props on the docs. fix #8301
Old issue but still relevant. Here is my workaround if anyone runs across this. There's no way to override the Set opacity to 0, give it an ID Then customize the styling #myoverlay {
background-color: rgba(150, 0, 0, 0.95);
} This makes the If you're trying to customize the navigation drawer overlay.. then set the for example... <v-overlay v-if="drawer" id="myoverlay" absolute opacity="0" />
<v-navigation-drawer v-model="drawer" hide-overlay ... /> |
Problem to solve
Right now the v-dialog component has a fixed and unchangable overlay color that is set to "opacity: 0.46; background-color: rgb(33, 33, 33);". That is the v-overlay__scrim element. The problem is that users cannot change the opacity of the background overlay for the dialogs.
The only way right now to change the opacity of the overlay is to manually override the class. But it still doesn't work if there are multiple dialogs on a single page.
Proposed solution
The solution is to simply add a background (or overlay) property to the v-dialog component. This allows a user to change both the opacity and the color of dialog's overlay:
The text was updated successfully, but these errors were encountered: