Dropdowns

Toggle contextual overlays for displaying lists of links and more with the LCUI dropdown component.

Overview

Dropdowns are toggleable, contextual overlays for displaying lists of links and more. They’re toggled by clicking, not by hovering; this is an intentional design decision.

Examples

  1. <w class="btn" data-toggle="dropdown" data-target="dropdown-example-1">
  2. <w type="textview">Dropdown button</w>
  3. <w type="textview" class="icon icon-chevron-down"></w>
  4. </w>
  5. <w type="dropdown-menu" id="dropdown-example-1">
  6. <w type="textview" class="dropdown-item">Action</w>
  7. <w type="textview" class="dropdown-item">Another action</w>
  8. <w type="textview" class="dropdown-item">Something else here</w>
  9. </w>

Menu headers

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

  1. <w type="dropdown-menu">
  2. <w type="h6" class="dropdown-header">Dropdown header</w>
  3. <w type="textview" class="dropdown-item">Action</w>
  4. <w type="textview" class="dropdown-item">Another action</w>
  5. </w>

Menu dividers

Separate groups of related menu items with a divider.

  1. <w type="dropdown-menu">
  2. <w type="textview" class="dropdown-item">Action</w>
  3. <w type="textview" class="dropdown-item">Another action</w>
  4. <w type="textview" class="dropdown-item">Something else here</w>
  5. <w class="dropdown-divider"></w>
  6. <w type="textview" class="dropdown-item">Separated link</w>
  7. </w>