Skip to content

Dropdown Menu — Reference

Reference · Advanced · Bootstrap 5

Dropdown Menu settings and behavior. Settings include ID, Class, Controlled By, Align End.

Menu container for dropdown items. Place inside a Dropdown and add items, headers, dividers, or text inside.

Name Description
IDOptional unique identifier for this element. Sets the element's id attribute. Keep IDs unique per page (useful for anchors, label for targets, and JavaScript hooks). Bootstrap docs: Introduction Default: "". Attribute: id.
ClassAdds raw class names to the element. Adds text directly to the class attribute. Use this for custom utility classes or project-specific overrides. Separate multiple classes with spaces. Bootstrap docs: Utilities API Default: "". Attribute: class.
Controlled ByDropdown menu button styling. Controls dropdown-related button styling when supported by the rule. Use Bootstrap dropdown component patterns for proper toggling and accessibility. Bootstrap docs: Dropdowns Options: None Default: "". Attribute: aria-labelledby.
Align EndAligns menu to the end. Aligns the dropdown menu to the end side. This uses dropdown-menu-end to align the menu to the right in LTR layouts (and to the left in RTL). Bootstrap docs: Menu alignment Default: false.
Drop UpOpens menu upward. Changes the dropdown direction so the menu renders above the toggle. This is useful near the bottom of the viewport where there is limited space below. Bootstrap docs: Dropdown directions Default: false.