You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use the `overlay` prop to control whether the Drawer has an overlay or not. Defaults to `true`.
@@ -193,13 +218,14 @@ slots:
193
218
194
219
### Scale background
195
220
196
-
Use the `should-scale-background` prop to scale the background when the Drawer is open, creating a visual depth effect.
221
+
Use the `should-scale-background` prop to scale the background when the Drawer is open, creating a visual depth effect. You can set the `set-background-color-on-scale` prop to `false` to prevent changing the background color.
197
222
198
223
::component-code
199
224
---
200
225
prettier: true
201
226
props:
202
227
shouldScaleBackground: true
228
+
setBackgroundColorOnScale: true
203
229
slots:
204
230
default: |
205
231
@@ -217,12 +243,12 @@ slots:
217
243
::
218
244
219
245
::warning
220
-
Make sure to add the `vaul-drawer-wrapper` directive to a parent element of your app to make this work.
246
+
Make sure to add the `data-vaul-drawer-wrapper` directive to a parent element of your app to make this work.
Copy file name to clipboardexpand all lines: playground/app/pages/components/drawer.vue
+5-5
Original file line number
Diff line number
Diff line change
@@ -20,39 +20,39 @@ const inset = ref(false)
20
20
</template>
21
21
</UDrawer>
22
22
23
-
<UDrawershould-scale-backgroundtitle="Drawer with `should-scale-background`"description="You need to add the `vaul-drawer-wrapper` directive to your content to make it work.":inset="inset">
23
+
<UDrawershould-scale-backgroundtitle="Drawer with `should-scale-background`"description="You need to add the `data-vaul-drawer-wrapper` directive to your content to make it work.":inset="inset">
24
24
<UButtoncolor="neutral"variant="outline"label="Open with scale" />
25
25
26
26
<template #body>
27
27
<Placeholderclass="h-screen w-full" />
28
28
</template>
29
29
</UDrawer>
30
30
31
-
<UDrawertitle="Drawer with bottom direction"direction="bottom":handle="false":inset="inset">
31
+
<UDrawertitle="Drawer with bottom direction"direction="bottom":inset="inset">
32
32
<UButtoncolor="neutral"variant="outline"label="Open on bottom" />
33
33
34
34
<template #body>
35
35
<Placeholderclass="h-96 w-full" />
36
36
</template>
37
37
</UDrawer>
38
38
39
-
<UDrawertitle="Drawer with left direction"direction="left":handle="false":inset="inset">
39
+
<UDrawertitle="Drawer with left direction"direction="left":inset="inset">
40
40
<UButtoncolor="neutral"variant="outline"label="Open on left" />
41
41
42
42
<template #body>
43
43
<Placeholderclass="w-96 h-full" />
44
44
</template>
45
45
</UDrawer>
46
46
47
-
<UDrawertitle="Drawer with top direction"direction="top":handle="false":inset="inset">
47
+
<UDrawertitle="Drawer with top direction"direction="top":inset="inset">
48
48
<UButtoncolor="neutral"variant="outline"label="Open on top" />
49
49
50
50
<template #body>
51
51
<Placeholderclass="h-96 w-full" />
52
52
</template>
53
53
</UDrawer>
54
54
55
-
<UDrawertitle="Drawer with right direction"direction="right":handle="false":inset="inset">
55
+
<UDrawertitle="Drawer with right direction"direction="right":inset="inset">
56
56
<UButtoncolor="neutral"variant="outline"label="Open on right" />
0 commit comments