Dropdown

Single Button Dropdowns

Any single .btn can be turned into a dropdown toggle with some markup changes. Here's how you can put them to work with either <button> elements.

Single Button Variant Dropdowns

Any single .btn can be turned into a dropdown toggle with some markup changes. Here's how you can put them to work with either <button> elements.

Split Button Dropdowns

Similarly, create split button dropdowns with virtually the same markup as single button dropdowns, but with the addition of .dropdown-toggle-split for proper spacing around the dropdown caret.

Dark Dropdowns

Opt into darker dropdowns to match a dark navbar or custom style by adding .dropdown-menu-dark onto an existing .dropdown-menu. No changes are required to the dropdown items.

Dropdown Direction

Trigger dropdown menus above elements by adding .dropup, dropdown menus at the left of the elements by adding .dropstart or dropdown menus at the right of the elements by adding .dropend.

Dropdown Menu Items

Add .active to items in the dropdown to style them as active. To convey the active state to assistive technologies, use the aria-current attribute — using the page value for the current page, or true for the current item in a set.

Add .disabled to items in the dropdown to style them as disabled.

Dropdown options

Use data-bs-offset or data-bs-reference to change the location of the dropdown.

Auto close behavior

By default, the dropdown menu is closed when clicking inside or outside the dropdown menu. You can use the autoClose option to change this behavior of the dropdown.

Menu Content

Add a header to label sections of actions in any dropdown menu.

Separate groups of related menu items with a divider.

Place any freeform text within a dropdown menu with text and use spacing utilities. Note that you’ll likely need additional sizing styles to constrain the menu width.

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.

© Darkone by StackBros.