Basic Dropdown

The .dropdownclass indicates a dropdown menu. To open the dropdown menu,use a button or a link with a class of .dropdown-toggleand the data-toggle="dropdown"attribute. The .caretclass creates a caret arrow icon(),which indicates that the button is a dropdown. Add the .dropdown-menuclass to a <ul>element to actually build the dropdown menu.

Dropdown Divider

The .dividerclass is used to separate links inside the dropdown menu with a thin horizontal border:

Dropdown Header

The .dropdown-headerclass is used to add headers inside the dropdown menu:

Disable and Active items

To disable an item in the dropdown menu,use the .disabledclass(gets a light-grey text color and a"no-parking-sign" icon on hover):

Dropdown Position

To right-align the dropdown,add the .dropdown-menu-rightclass to the element with .dropdown-menu:

Dropup

If you want the dropdown menu to expand upwards instead of downwards,change the <div>element with class="dropdown" to "dropup":

Dropdown Accessibility

To help improve accessibility for people using screen readers,you should include the following roleand aria-*attributes,when creating a dropdown menu:

Dropup

If you want the dropdown menu to expand upwards instead of downwards,change the <div>element with class="dropdown" to "dropup":