@@ -62,7 +62,7 @@ And with `<a>` elements:
62
62
The best part is you can do this with any button variant, too:
63
63
64
64
<div class =" bd-example " >
65
- <div class =" btn-group " >
65
+ <div class =" btn-group dropdown " >
66
66
<button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Primary</button>
67
67
<div class="dropdown-menu">
68
68
<a class="dropdown-item" href="#">Action</a>
@@ -72,7 +72,7 @@ The best part is you can do this with any button variant, too:
72
72
<a class="dropdown-item" href="#">Separated link</a>
73
73
</div>
74
74
</div ><!-- /btn-group -->
75
- <div class =" btn-group " >
75
+ <div class =" btn-group dropdown " >
76
76
<button type="button" class="btn btn-secondary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Secondary</button>
77
77
<div class="dropdown-menu">
78
78
<a class="dropdown-item" href="#">Action</a>
@@ -82,7 +82,7 @@ The best part is you can do this with any button variant, too:
82
82
<a class="dropdown-item" href="#">Separated link</a>
83
83
</div>
84
84
</div ><!-- /btn-group -->
85
- <div class =" btn-group " >
85
+ <div class =" btn-group dropdown " >
86
86
<button type="button" class="btn btn-success dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Success</button>
87
87
<div class="dropdown-menu">
88
88
<a class="dropdown-item" href="#">Action</a>
@@ -92,7 +92,7 @@ The best part is you can do this with any button variant, too:
92
92
<a class="dropdown-item" href="#">Separated link</a>
93
93
</div>
94
94
</div ><!-- /btn-group -->
95
- <div class =" btn-group " >
95
+ <div class =" btn-group dropdown " >
96
96
<button type="button" class="btn btn-info dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Info</button>
97
97
<div class="dropdown-menu">
98
98
<a class="dropdown-item" href="#">Action</a>
@@ -102,7 +102,7 @@ The best part is you can do this with any button variant, too:
102
102
<a class="dropdown-item" href="#">Separated link</a>
103
103
</div>
104
104
</div ><!-- /btn-group -->
105
- <div class =" btn-group " >
105
+ <div class =" btn-group dropdown " >
106
106
<button type="button" class="btn btn-warning dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Warning</button>
107
107
<div class="dropdown-menu">
108
108
<a class="dropdown-item" href="#">Action</a>
@@ -112,7 +112,7 @@ The best part is you can do this with any button variant, too:
112
112
<a class="dropdown-item" href="#">Separated link</a>
113
113
</div>
114
114
</div ><!-- /btn-group -->
115
- <div class =" btn-group " >
115
+ <div class =" btn-group dropdown " >
116
116
<button type="button" class="btn btn-danger dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Danger</button>
117
117
<div class="dropdown-menu">
118
118
<a class="dropdown-item" href="#">Action</a>
@@ -126,7 +126,7 @@ The best part is you can do this with any button variant, too:
126
126
127
127
{% highlight html %}
128
128
<!-- Example single danger button -->
129
- <div class =" btn-group " >
129
+ <div class =" btn-group dropdown " >
130
130
<button type =" button " class =" btn btn-danger dropdown-toggle " data-toggle =" dropdown " aria-haspopup =" true " aria-expanded =" false " >
131
131
Action
132
132
</button >
@@ -147,7 +147,7 @@ Similarly, create split button dropdowns with virtually the same markup as singl
147
147
We use this extra class to reduce the horizontal ` padding ` on either side of the caret by 25% and remove the ` margin-left ` that's added for regular button dropdowns. Those extra changes keep the caret centered in the split button and provide a more appropriately sized hit area next to the main button.
148
148
149
149
<div class =" bd-example " >
150
- <div class =" btn-group " >
150
+ <div class =" btn-group dropdown " >
151
151
<button type="button" class="btn btn-primary">Primary</button>
152
152
<button type="button" class="btn btn-primary dropdown-toggle dropdown-toggle-split" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
153
153
<span class="sr-only">Toggle Dropdown</span>
@@ -160,7 +160,7 @@ We use this extra class to reduce the horizontal `padding` on either side of the
160
160
<a class="dropdown-item" href="#">Separated link</a>
161
161
</div>
162
162
</div ><!-- /btn-group -->
163
- <div class =" btn-group " >
163
+ <div class =" btn-group dropdown " >
164
164
<button type="button" class="btn btn-secondary">Secondary</button>
165
165
<button type="button" class="btn btn-secondary dropdown-toggle dropdown-toggle-split" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
166
166
<span class="sr-only">Toggle Dropdown</span>
@@ -173,7 +173,7 @@ We use this extra class to reduce the horizontal `padding` on either side of the
173
173
<a class="dropdown-item" href="#">Separated link</a>
174
174
</div>
175
175
</div ><!-- /btn-group -->
176
- <div class =" btn-group " >
176
+ <div class =" btn-group dropdown " >
177
177
<button type="button" class="btn btn-success">Success</button>
178
178
<button type="button" class="btn btn-success dropdown-toggle dropdown-toggle-split" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
179
179
<span class="sr-only">Toggle Dropdown</span>
@@ -186,7 +186,7 @@ We use this extra class to reduce the horizontal `padding` on either side of the
186
186
<a class="dropdown-item" href="#">Separated link</a>
187
187
</div>
188
188
</div ><!-- /btn-group -->
189
- <div class =" btn-group " >
189
+ <div class =" btn-group dropdown " >
190
190
<button type="button" class="btn btn-info">Info</button>
191
191
<button type="button" class="btn btn-info dropdown-toggle dropdown-toggle-split" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
192
192
<span class="sr-only">Toggle Dropdown</span>
@@ -199,7 +199,7 @@ We use this extra class to reduce the horizontal `padding` on either side of the
199
199
<a class="dropdown-item" href="#">Separated link</a>
200
200
</div>
201
201
</div ><!-- /btn-group -->
202
- <div class =" btn-group " >
202
+ <div class =" btn-group dropdown " >
203
203
<button type="button" class="btn btn-warning">Warning</button>
204
204
<button type="button" class="btn btn-warning dropdown-toggle dropdown-toggle-split" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
205
205
<span class="sr-only">Toggle Dropdown</span>
@@ -212,7 +212,7 @@ We use this extra class to reduce the horizontal `padding` on either side of the
212
212
<a class="dropdown-item" href="#">Separated link</a>
213
213
</div>
214
214
</div ><!-- /btn-group -->
215
- <div class =" btn-group " >
215
+ <div class =" btn-group dropdown " >
216
216
<button type="button" class="btn btn-danger">Danger</button>
217
217
<button type="button" class="btn btn-danger dropdown-toggle dropdown-toggle-split" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
218
218
<span class="sr-only">Toggle Dropdown</span>
@@ -229,7 +229,7 @@ We use this extra class to reduce the horizontal `padding` on either side of the
229
229
230
230
{% highlight html %}
231
231
<!-- Example split danger button -->
232
- <div class =" btn-group " >
232
+ <div class =" btn-group dropdown " >
233
233
<button type =" button " class =" btn btn-danger " >Action</button >
234
234
<button type =" button " class =" btn btn-danger dropdown-toggle dropdown-toggle-split " data-toggle =" dropdown " aria-haspopup =" true " aria-expanded =" false " >
235
235
<span class="sr-only">Toggle Dropdown</span>
@@ -250,7 +250,7 @@ Button dropdowns work with buttons of all sizes, including default and split dro
250
250
251
251
<div class =" bd-example " >
252
252
<div class =" btn-toolbar " role =" toolbar " >
253
- <div class="btn-group">
253
+ <div class="btn-group dropdown ">
254
254
<button class="btn btn-secondary btn-lg dropdown-toggle" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
255
255
Large button
256
256
</button>
@@ -262,7 +262,7 @@ Button dropdowns work with buttons of all sizes, including default and split dro
262
262
<a class="dropdown-item" href="#">Separated link</a>
263
263
</div>
264
264
</div><!-- /btn-group -->
265
- <div class="btn-group ml-2">
265
+ <div class="btn-group dropdown ml-2">
266
266
<button type="button" class="btn btn-lg btn-secondary">Large split button</button>
267
267
<button type="button" class="btn btn-lg btn-secondary dropdown-toggle dropdown-toggle-split" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
268
268
<span class="sr-only">Toggle Dropdown</span>
@@ -277,7 +277,7 @@ Button dropdowns work with buttons of all sizes, including default and split dro
277
277
</div><!-- /btn-group -->
278
278
</div ><!-- /btn-toolbar -->
279
279
<div class =" btn-toolbar " role =" toolbar " >
280
- <div class="btn-group">
280
+ <div class="btn-group dropdown ">
281
281
<button class="btn btn-secondary btn-sm dropdown-toggle" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
282
282
Small button
283
283
</button>
@@ -289,7 +289,7 @@ Button dropdowns work with buttons of all sizes, including default and split dro
289
289
<a class="dropdown-item" href="#">Separated link</a>
290
290
</div>
291
291
</div><!-- /btn-group -->
292
- <div class="btn-group ml-2">
292
+ <div class="btn-group dropdown ml-2">
293
293
<button type="button" class="btn btn-sm btn-secondary">Small split button</button>
294
294
<button type="button" class="btn btn-sm btn-secondary dropdown-toggle dropdown-toggle-split" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
295
295
<span class="sr-only">Toggle Dropdown</span>
@@ -307,15 +307,15 @@ Button dropdowns work with buttons of all sizes, including default and split dro
307
307
308
308
{% highlight html %}
309
309
<!-- Large button groups (default and split) -->
310
- <div class =" btn-group " >
310
+ <div class =" btn-group dropdown " >
311
311
<button class =" btn btn-secondary btn-lg dropdown-toggle " type =" button " data-toggle =" dropdown " aria-haspopup =" true " aria-expanded =" false " >
312
312
Large button
313
313
</button >
314
314
<div class =" dropdown-menu " >
315
315
...
316
316
</div >
317
317
</div >
318
- <div class =" btn-group " >
318
+ <div class =" btn-group dropdown " >
319
319
<button class =" btn btn-secondary btn-lg " type =" button " >
320
320
Large button
321
321
</button >
@@ -328,15 +328,15 @@ Button dropdowns work with buttons of all sizes, including default and split dro
328
328
</div >
329
329
330
330
<!-- Small button groups (default and split) -->
331
- <div class =" btn-group " >
331
+ <div class =" btn-group dropdown " >
332
332
<button class =" btn btn-secondary btn-sm dropdown-toggle " type =" button " data-toggle =" dropdown " aria-haspopup =" true " aria-expanded =" false " >
333
333
Small button
334
334
</button >
335
335
<div class =" dropdown-menu " >
336
336
...
337
337
</div >
338
338
</div >
339
- <div class =" btn-group " >
339
+ <div class =" btn-group dropdown " >
340
340
<button class =" btn btn-secondary btn-sm " type =" button " >
341
341
Small button
342
342
</button >
@@ -562,7 +562,7 @@ By default, a dropdown menu is automatically positioned 100% from the top and al
562
562
{% endcallout %}
563
563
564
564
{% example html %}
565
- <div class =" btn-group " >
565
+ <div class =" btn-group dropdown " >
566
566
<button type =" button " class =" btn btn-secondary dropdown-toggle " data-toggle =" dropdown " aria-haspopup =" true " aria-expanded =" false " >
567
567
This dropdown's menu is right-aligned
568
568
</button >
0 commit comments