The b.Menu constructor creates a menu.
| Child | Action |
|---|---|
b.OnMenu(...any) | Apply children to the <aside class="menu"> element |
string | Add string as a menu label |
b.MenuLabel(...any) | Add a menu label |
b.MenuEntry(...any) | Add a menu entry to the current menu list, creating it if it does not exist |
gomponents.Nodeof type gomponents.AttributeType | Apply attribute to the menu |
gomponents.Nodeof type gomponents.ElementType | Add element to the current menu list, creating it if it does not exist |
e.Element | Add element to the current menu list, creating it if it does not exist |
| Anything else | Apply child to the <aside class="menu"> element |
The b.MenuLabel constructor creates a menu label.
The b.MenuList constructor creates a menu list.
The b.MenuEntry constructor creates a menu entry.
| Child | Action |
|---|---|
b.OnLi(...any) | Apply children to the <li> element |
b.MenuEntry(...any) | Add a menu entry to the current submenu, creating it if it does not exist |
b.MenuSublist(...any) | Add a submenu to the current menu entry |
| Anything else | Apply child to the <li> element |
The b.MenuAHref constructor creates an entry for a menu list with a link wrapped inside it.
| Modifier | Action |
|---|---|
b.Active | Mark the link as active |
| Child | Action |
|---|---|
b.OnLi(...any) | Apply children to the <li> element |
b.OnA(...any) | Apply children to the <a> element |
e.Class, e.Classer, e.Classeser or e.Styles | Apply child to the <li> element |
gomponents.Nodeof type gomponents.AttributeType | Apply attribute to the link |
gomponents.Nodeof type gomponents.ElementType | Add element to the entry |
| Anything else | Apply child to the <li> element |
The b.MenuSublist constructor creates a submenu.
When manually adding a link inside a menu entry, add b.Active to it in order to mark it as active.