When the user needs to perform an action, and depending on space constraints or the frequency of use, the action does not need to be visible at all times.
Menus provide a list of available actions and options. They’re used in dropdowns, selects, and context menus.
Menus appear relative to the control or interaction that triggered the menu. Clicking an item from the menu performs the action or selects the option. For most actions, the menu should close when a menu item is clicked. If the clicked menu item is part of a set of multi-selectable options, then the menu should stay open.
Mark as read
vs Mark as unread
)<ul class="dropdown-menu" role="menu">
<li role="presentation">
<a href="">Bold
<span class="pull-right text-muted">Ctrl+B</span>
</a>
</li>
<li role="presentation">
<a href="">Italic
<span class="pull-right text-muted">Ctrl+I</span>
</a>
</li>
<li role="presentation">
<a href="">Underline
<span class="pull-right text-muted">Ctrl+U</span>
</a>
</li>
<li role="presentation" class="divider"></li>
<li role="presentation">
<a href="">Font
<i class="fa fa-caret-right pull-right"></i>
</a>
</li>
<li role="presentation">
<a href="">Font size
<i class="fa fa-caret-right pull-right"></i>
</a>
</li>
<li role="presentation" class="divider"></li>
<li role="presentation" class="disabled">
<a>Conditional formatting...</a>
</li>
<li role="presentation" class="divider"></li>
<li role="presentation">
<a href="">Clear formatting</a>
</li>
</ul>
Submenus help organize menu items.
<ul class="dropdown-menu" role="menu">
<li role="presentation">
<a href="">Submenu item
<i class="fa fa-caret-right pull-right"></i>
</a>
</li>
<li role="presentation" class="disabled">
<a href="">Disabled submenu item
<i class="fa fa-caret-right pull-right"></i>
</a>
</li>
</ul>
Use icons for menu items that have a common, easily recognizable icon. You don’t need an icon for every menu item, only for menu items that are more frequently used.
If you have an icon in a menu, ensure that all menu items are aligned appropriately.
<ul class="dropdown-menu has-icon" role="menu">
<li role="presentation">
<a href="">
<i class="fa fa-fw fa-star dropdown-menu-icon"></i> Star
</a>
</li>
<li role="presentation">
<a href=""> Share...</a>
</li>
<li class="divider" role="presentation"></li>
<li role="presentation">
<a href="">
<i class="fa fa-fw fa-trash-o dropdown-menu-icon"></i> Remove
</a>
</li>
</ul>