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
Copy file name to clipboardExpand all lines: docs/components/offcanvas.md
+90Lines changed: 90 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -209,6 +209,93 @@ Try the top, right, and bottom examples out below.
209
209
}
210
210
</script>
211
211
```
212
+
213
+
## Backdrop
214
+
215
+
Scrolling the `<body>` element is disabled when an offcanvas and its backdrop are visible. Use the `scroll` property to toggle `<body>` scrolling and `backdrop` to toggle the backdrop.
<p>Try scrolling the rest of the page to see this option in action.</p>
279
+
</COffcanvasBody>
280
+
</COffcanvas>
281
+
</template>
282
+
<script>
283
+
export default {
284
+
data() {
285
+
return {
286
+
visibleScrolling: false,
287
+
visibleWithBackdrop: false,
288
+
visibleWithBothOptions: false,
289
+
}
290
+
}
291
+
}
292
+
</script>
293
+
```
294
+
295
+
## Accessibility
296
+
297
+
Since the offcanvas panel is conceptually a modal dialog, be sure to add `aria-labelledby="..."`—referencing the offcanvas title—to `<COffcanvas>`. Note that you don’t need to add `role="dialog"` since we already add it automatically.
298
+
212
299
<script>
213
300
exportdefault {
214
301
data() {
@@ -217,6 +304,9 @@ Try the top, right, and bottom examples out below.
0 commit comments