@@ -410,6 +410,132 @@ Trigger dropdown menus above elements by adding `.dropup` to the parent element.
410
410
</div >
411
411
{% endhighlight %}
412
412
413
+ ## Dropright variation
414
+
415
+ Trigger dropdown menus at the right of the elements by adding ` .dropright ` to the parent element.
416
+
417
+ <div class =" bd-example " >
418
+ <div class =" btn-group dropright " >
419
+ <button type="button" class="btn btn-secondary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
420
+ Dropright
421
+ </button>
422
+ <div class="dropdown-menu">
423
+ <a class="dropdown-item" href="#">Action</a>
424
+ <a class="dropdown-item" href="#">Another action</a>
425
+ <a class="dropdown-item" href="#">Something else here</a>
426
+ <div class="dropdown-divider"></div>
427
+ <a class="dropdown-item" href="#">Separated link</a>
428
+ </div>
429
+ </div >
430
+
431
+ <div class =" btn-group dropright " >
432
+ <button type="button" class="btn btn-secondary">
433
+ Split dropright
434
+ </button>
435
+ <button type="button" class="btn btn-secondary dropdown-toggle dropdown-toggle-split" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
436
+ <span class="sr-only">Toggle Dropdright</span>
437
+ </button>
438
+ <div class="dropdown-menu">
439
+ <a class="dropdown-item" href="#">Action</a>
440
+ <a class="dropdown-item" href="#">Another action</a>
441
+ <a class="dropdown-item" href="#">Something else here</a>
442
+ <div class="dropdown-divider"></div>
443
+ <a class="dropdown-item" href="#">Separated link</a>
444
+ </div>
445
+ </div >
446
+ </div >
447
+
448
+ {% highlight html %}
449
+ <!-- Default dropright button -->
450
+ <div class =" btn-group dropright " >
451
+ <button type =" button " class =" btn btn-secondary " >Dropright</button >
452
+ <button type =" button " class =" btn btn-secondary dropdown-toggle " data-toggle =" dropdown " aria-haspopup =" true " aria-expanded =" false " >
453
+ <span class="sr-only">Toggle Dropright</span>
454
+ </button >
455
+ <div class =" dropdown-menu " >
456
+ <!-- Dropdown menu links -->
457
+ </div >
458
+ </div >
459
+
460
+ <!-- Split dropright button -->
461
+ <div class =" btn-group dropright " >
462
+ <button type =" button " class =" btn btn-secondary " >
463
+ Split dropright
464
+ </button >
465
+ <button type =" button " class =" btn btn-secondary dropdown-toggle " data-toggle =" dropdown " aria-haspopup =" true " aria-expanded =" false " >
466
+ <span class="sr-only">Toggle Dropright</span>
467
+ </button >
468
+ <div class =" dropdown-menu " >
469
+ <!-- Dropdown menu links -->
470
+ </div >
471
+ </div >
472
+ {% endhighlight %}
473
+
474
+ ## Dropleft variation
475
+
476
+ Trigger dropdown menus at the left of the elements by adding ` .dropleft ` to the parent element.
477
+
478
+ <div class =" bd-example " >
479
+ <div class =" btn-group dropleft " >
480
+ <button type="button" class="btn btn-secondary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
481
+ Dropleft
482
+ </button>
483
+ <div class="dropdown-menu">
484
+ <a class="dropdown-item" href="#">Action</a>
485
+ <a class="dropdown-item" href="#">Another action</a>
486
+ <a class="dropdown-item" href="#">Something else here</a>
487
+ <div class="dropdown-divider"></div>
488
+ <a class="dropdown-item" href="#">Separated link</a>
489
+ </div>
490
+ </div >
491
+
492
+ <div class =" btn-group " >
493
+ <div class="btn-group dropleft" role="group">
494
+ <button type="button" class="btn btn-secondary dropdown-toggle dropdown-toggle-split" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
495
+ <span class="sr-only">Toggle Dropleft</span>
496
+ </button>
497
+ <div class="dropdown-menu">
498
+ <a class="dropdown-item" href="#">Action</a>
499
+ <a class="dropdown-item" href="#">Another action</a>
500
+ <a class="dropdown-item" href="#">Something else here</a>
501
+ <div class="dropdown-divider"></div>
502
+ <a class="dropdown-item" href="#">Separated link</a>
503
+ </div>
504
+ </div>
505
+ <button type="button" class="btn btn-secondary">
506
+ Split dropleft
507
+ </button>
508
+ </div >
509
+ </div >
510
+
511
+ {% highlight html %}
512
+ <!-- Default dropleft button -->
513
+ <div class =" btn-group dropleft " >
514
+ <button type =" button " class =" btn btn-secondary dropdown-toggle " data-toggle =" dropdown " aria-haspopup =" true " aria-expanded =" false " >
515
+ Dropleft
516
+ </button >
517
+ <div class =" dropdown-menu " >
518
+ <!-- Dropdown menu links -->
519
+ </div >
520
+ </div >
521
+
522
+ <!-- Split dropleft button -->
523
+ <div class =" btn-group " >
524
+ <div class =" btn-group dropleft " role =" group " >
525
+ <button type="button" class="btn btn-secondary dropdown-toggle dropdown-toggle-split" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
526
+ <span class="sr-only">Toggle Dropleft</span>
527
+ </button>
528
+ <div class="dropdown-menu">
529
+ <!-- Dropdown menu links -->
530
+ </div>
531
+ </div >
532
+ <button type =" button " class =" btn btn-secondary " >
533
+ Split dropleft
534
+ </button >
535
+ </div >
536
+ {% endhighlight %}
537
+
538
+
413
539
## Menu items
414
540
415
541
Historically dropdown menu contents * had* to be links, but that's no longer the case with v4. Now you can optionally use ` <button> ` elements in your dropdowns instead of just ` <a> ` s.
0 commit comments