Dropdowns Toggle contextual overlays for displaying lists of links and more with the Bootstrap dropdown plugin.
Dropdowns are toggleable, contextual overlays for displaying lists of links and more. They’re made interactive with the included Bootstrap dropdown JavaScript plugin. They’re toggled by clicking, not by hovering; this is an intentional design decision. Dropdowns are built on a third party library, Popper.js, which provides dynamic positioning and viewport detection.
Find more facts and uses at the bootstrap official documentation.
Kitchen Sink example
Links & buttons
.dropdown
, or another element that declares position: relative;
. Dropdowns can be triggered from <a>
or <button>
elements to better fit your potential needs.
Button
Link
Dropdown buttons
Variations
Split button
Multilevel dropdown
.dropdown-multilevel
, change direction of by adding .dropdown-multilevel-left
(right by default)
Content types
Sizing dropdowns
No arrow
.no-arrow
to .dropdown-toggle
Animated dropdowns
.dropdown-menu-animated
, .fadeup
, .fadedown
, .faderight
, .fadeleft
to .dropdown-menu
Directional Arrows
.dropup
, .dropright
, and .dropleft
to the parent element.
Dropup
Dropright
Dropleft
Container examples
.dropdown-sm
, .dropdown-md
, .dropdown-lg
, and .dropdown-xl
Headers examples
.dropdown-header
using utility classes. Change backgrounds, colors, and paddings using various helpers
Menu alignment
.dropdown-menu-right
to a .dropdown-menu
to right align the dropdown menu.
Responsive alignment
data-display="static"
attribute and use the responsive variation classes. To align left/right the dropdown menu with the given breakpoint or larger, add .dropdown-menu{-sm|-md|-lg|-xl}-right
or .dropdown-menu{-sm|-md|-lg|-xl}-left