The b.Dropdown
constructor creates a dropdown menu.
Modifier | Action |
---|---|
b.Active | Open the menu |
b.Clickable | Make the menu open when the button is clicked (javascript is automatically added) |
b.Hoverable | Make the menu open when the cursor hovers the button |
b.Up | Make the dropdown open to the top |
Child | Action |
---|---|
b.OnDropdown(...any) | Apply children to the <div class="dropdown"> element |
b.OnTrigger(...any) | Apply children to the <div class="dropdown-trigger"> element |
b.OnMenu(...any) | Apply children to the <div class="dropdown-menu"> element |
b.OnContent(...any) | Apply children to the <div class="dropdown-content"> element |
b.DropdownButton(...any) | Make this button (part of) the trigger |
b.DropdownDivider(...any) | Apply divider to the <div class="dropdown-content"> element |
b.DropdownItem(...any) | Apply item to the <div class="dropdown-content"> element |
b.DropdownAHref(...any) | Apply link item to the <div class="dropdown-content"> element |
b.ID | Set the ID of the <div class="dropdown-menu"> element |
e.Class | Apply class to the <div class="dropdown"> element |
string | Create a dropdown button with this label |
e.Element | Wrap child with the b.DropdownItem constructor and add it to the <div class="dropdown-content"> element |
gomponents.Node of type gomponents.AttributeType | Apply child to the <div class="dropdown"> element |
gomponents.Node of type gomponents.ElementType | Wrap child with the b.DropdownItem constructor and add it to the <div class="dropdown-content"> element |
Anything else | Apply child to the <div class="dropdown"> element |
The b.DropdownButton
constructor creates a button to be used as a dropdown trigger, with a Font Awesome caret icon to the right.
The b.DropdownItem
constructor creates a dropdown item.
The b.DropdownAHref
constructor creates a dropdown link item.
The b.DropdownDivider
constructor creates a dropdown divider.