Toggle contextual overlays for displaying lists of links and more with the Bootstrap dropdown plugin.. See official bootstrap document
The basic Dropdown is composed of a wrapping Dropdown and inner <DropdownMenu>
, and <DropdownToggle>
. By default the <DropdownToggle>
will render a Button component and accepts all the same props.
Similarly, You create a split dropdown by combining the Dropdown components with another Button and a ButtonGroup.
Dropdowns work with buttons of all sizes.
Trigger dropdown menus above, below, left, or to the right of their toggle elements, with the drop
prop.
Use data attribute data-dropdown-animation
with data-bs-toggle="dropdown"
to animate dropdown.
Create menu items with button or anchor tags. You can also add non-interactive dropdown items or add a header to label sections or separate groups with a divider.
Create menu items with button or anchor tags. You can also add non-interactive dropdown items or add a header to label sections or separate groups with a divider.
Add .header-wth-bg
class with <Dropdown.Header>
.
add class.text-center
with <Dropdown.Menu>
.
add class.text-center
with dropdown-menu class
Place any freeform text within a dropdown menu with text and use spacing utilities or simply use.dropdown-item-text
class.
Place avatar in dropdown item.
Place any icon or image inside.dropdown-item-text
class.
Add an icon using dropdown-menu .dropdown-bordered
Put a form within a dropdown menu, or make it into a dropdown menu, and use margin or padding utilities to give it the negative space you require.
Put a form within a dropdown menu, or make it into a dropdown menu, and use margin or padding utilities to give it the negative space you require.
Opt into darker dropdowns to match a dark navbar or custom style by adding variant="dark"
onto an existing DropdownMenu
. Alternatively, use menuVariant="dark"
when using the DropdownButton
component.
Checkout the example of dropdown with checkbox.
Checkout the example of dropdown with radio.