@@ -23,7 +23,7 @@ Offcanvas is a sidebar component that can be toggled via JavaScript to appear fr
23
23
24
24
Below is an offcanvas example that is shown by default (via ` .show ` on ` .offcanvas ` ). Offcanvas includes support for a header with a close button and an optional body class for some initial ` padding ` . We suggest that you include offcanvas headers with dismiss actions whenever possible, or provide an explicit dismiss action.
25
25
26
- <Example class = " bd-example-offcanvas p-0 bg-body-tertiary overflow-hidden" code = { ` <div class="offcanvas offcanvas-start show" tabindex="-1" id="offcanvas" aria-labelledby="offcanvasLabel">
26
+ <Example class = " bd-example-offcanvas p-0 bg-body-tertiary overflow-hidden" code = { ` <div class="offcanvas offcanvas-start show" id="offcanvas" aria-labelledby="offcanvasLabel">
27
27
<div class="offcanvas-header">
28
28
<h5 class="offcanvas-title" id="offcanvasLabel">Offcanvas</h5>
29
29
<button type="button" class="btn-close" data-bs-dismiss="offcanvas" aria-label="Close"></button>
@@ -49,7 +49,7 @@ You can use a link with the `href` attribute, or a button with the `data-bs-targ
49
49
Button with data-bs-target
50
50
</button>
51
51
52
- <div class="offcanvas offcanvas-start" tabindex="-1" id="offcanvasExample" aria-labelledby="offcanvasExampleLabel">
52
+ <div class="offcanvas offcanvas-start" id="offcanvasExample" aria-labelledby="offcanvasExampleLabel">
53
53
<div class="offcanvas-header">
54
54
<h5 class="offcanvas-title" id="offcanvasExampleLabel">Offcanvas</h5>
55
55
<button type="button" class="btn-close" data-bs-dismiss="offcanvas" aria-label="Close"></button>
@@ -77,7 +77,7 @@ Scrolling the `<body>` element is disabled when an offcanvas and its backdrop ar
77
77
78
78
<Example code = { ` <button class="btn btn-primary" type="button" data-bs-toggle="offcanvas" data-bs-target="#offcanvasScrolling" aria-controls="offcanvasScrolling">Enable body scrolling</button>
79
79
80
- <div class="offcanvas offcanvas-start" data-bs-scroll="true" data-bs-backdrop="false" tabindex="-1" id="offcanvasScrolling" aria-labelledby="offcanvasScrollingLabel">
80
+ <div class="offcanvas offcanvas-start" data-bs-scroll="true" data-bs-backdrop="false" id="offcanvasScrolling" aria-labelledby="offcanvasScrollingLabel">
81
81
<div class="offcanvas-header">
82
82
<h5 class="offcanvas-title" id="offcanvasScrollingLabel">Offcanvas with body scrolling</h5>
83
83
<button type="button" class="btn-close" data-bs-dismiss="offcanvas" aria-label="Close"></button>
@@ -93,7 +93,7 @@ You can also enable `<body>` scrolling with a visible backdrop.
93
93
94
94
<Example code = { ` <button class="btn btn-primary" type="button" data-bs-toggle="offcanvas" data-bs-target="#offcanvasWithBothOptions" aria-controls="offcanvasWithBothOptions">Enable both scrolling & backdrop</button>
95
95
96
- <div class="offcanvas offcanvas-start" data-bs-scroll="true" tabindex="-1" id="offcanvasWithBothOptions" aria-labelledby="offcanvasWithBothOptionsLabel">
96
+ <div class="offcanvas offcanvas-start" data-bs-scroll="true" id="offcanvasWithBothOptions" aria-labelledby="offcanvasWithBothOptionsLabel">
97
97
<div class="offcanvas-header">
98
98
<h5 class="offcanvas-title" id="offcanvasWithBothOptionsLabel">Backdrop with scrolling</h5>
99
99
<button type="button" class="btn-close" data-bs-dismiss="offcanvas" aria-label="Close"></button>
@@ -111,7 +111,7 @@ When backdrop is set to static, the offcanvas will not close when clicking outsi
111
111
Toggle static offcanvas
112
112
</button>
113
113
114
- <div class="offcanvas offcanvas-start" data-bs-backdrop="static" tabindex="-1" id="staticBackdrop" aria-labelledby="staticBackdropLabel">
114
+ <div class="offcanvas offcanvas-start" data-bs-backdrop="static" id="staticBackdrop" aria-labelledby="staticBackdropLabel">
115
115
<div class="offcanvas-header">
116
116
<h5 class="offcanvas-title" id="staticBackdropLabel">Offcanvas</h5>
117
117
<button type="button" class="btn-close" data-bs-dismiss="offcanvas" aria-label="Close"></button>
@@ -133,7 +133,7 @@ Change the appearance of offcanvases with utilities to better match them to diff
133
133
** Heads up!** Dark variants for components were deprecated in v5.3.0 with the introduction of color modes. Instead of manually adding classes mentioned above, set ` data-bs-theme="dark" ` on the root element, a parent wrapper, or the component itself.
134
134
</Callout >
135
135
136
- <Example class = " bd-example-offcanvas p-0 bg-body-secondary overflow-hidden" code = { ` <div class="offcanvas offcanvas-start show text-bg-dark" tabindex="-1" id="offcanvasDark" aria-labelledby="offcanvasDarkLabel">
136
+ <Example class = " bd-example-offcanvas p-0 bg-body-secondary overflow-hidden" code = { ` <div class="offcanvas offcanvas-start show text-bg-dark" id="offcanvasDark" aria-labelledby="offcanvasDarkLabel">
137
137
<div class="offcanvas-header">
138
138
<h5 class="offcanvas-title" id="offcanvasDarkLabel">Offcanvas</h5>
139
139
<button type="button" class="btn-close btn-close-white" data-bs-dismiss="offcanvasDark" aria-label="Close"></button>
@@ -162,7 +162,7 @@ To make a responsive offcanvas, replace the `.offcanvas` base class with a respo
162
162
163
163
<div class="alert alert-info d-none d-lg-block">Resize your browser to show the responsive offcanvas toggle.</div>
164
164
165
- <div class="offcanvas-lg offcanvas-end" tabindex="-1" id="offcanvasResponsive" aria-labelledby="offcanvasResponsiveLabel">
165
+ <div class="offcanvas-lg offcanvas-end" id="offcanvasResponsive" aria-labelledby="offcanvasResponsiveLabel">
166
166
<div class="offcanvas-header">
167
167
<h5 class="offcanvas-title" id="offcanvasResponsiveLabel">Responsive offcanvas</h5>
168
168
<button type="button" class="btn-close" data-bs-dismiss="offcanvas" data-bs-target="#offcanvasResponsive" aria-label="Close"></button>
@@ -185,7 +185,7 @@ Try the top, right, and bottom examples out below.
185
185
186
186
<Example code = { ` <button class="btn btn-primary" type="button" data-bs-toggle="offcanvas" data-bs-target="#offcanvasTop" aria-controls="offcanvasTop">Toggle top offcanvas</button>
187
187
188
- <div class="offcanvas offcanvas-top" tabindex="-1" id="offcanvasTop" aria-labelledby="offcanvasTopLabel">
188
+ <div class="offcanvas offcanvas-top" id="offcanvasTop" aria-labelledby="offcanvasTopLabel">
189
189
<div class="offcanvas-header">
190
190
<h5 class="offcanvas-title" id="offcanvasTopLabel">Offcanvas top</h5>
191
191
<button type="button" class="btn-close" data-bs-dismiss="offcanvas" aria-label="Close"></button>
@@ -197,7 +197,7 @@ Try the top, right, and bottom examples out below.
197
197
198
198
<Example code = { ` <button class="btn btn-primary" type="button" data-bs-toggle="offcanvas" data-bs-target="#offcanvasRight" aria-controls="offcanvasRight">Toggle right offcanvas</button>
199
199
200
- <div class="offcanvas offcanvas-end" tabindex="-1" id="offcanvasRight" aria-labelledby="offcanvasRightLabel">
200
+ <div class="offcanvas offcanvas-end" id="offcanvasRight" aria-labelledby="offcanvasRightLabel">
201
201
<div class="offcanvas-header">
202
202
<h5 class="offcanvas-title" id="offcanvasRightLabel">Offcanvas right</h5>
203
203
<button type="button" class="btn-close" data-bs-dismiss="offcanvas" aria-label="Close"></button>
@@ -209,7 +209,7 @@ Try the top, right, and bottom examples out below.
209
209
210
210
<Example code = { ` <button class="btn btn-primary" type="button" data-bs-toggle="offcanvas" data-bs-target="#offcanvasBottom" aria-controls="offcanvasBottom">Toggle bottom offcanvas</button>
211
211
212
- <div class="offcanvas offcanvas-bottom" tabindex="-1" id="offcanvasBottom" aria-labelledby="offcanvasBottomLabel">
212
+ <div class="offcanvas offcanvas-bottom" id="offcanvasBottom" aria-labelledby="offcanvasBottomLabel">
213
213
<div class="offcanvas-header">
214
214
<h5 class="offcanvas-title" id="offcanvasBottomLabel">Offcanvas bottom</h5>
215
215
<button type="button" class="btn-close" data-bs-dismiss="offcanvas" aria-label="Close"></button>
0 commit comments