Menu

The b.Menu constructor creates a menu.

ChildAction
b.OnMenu(...any)Apply children to the <aside class="menu"> element
stringAdd 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.AttributeTypeApply attribute to the menu
gomponents.Nodeof type gomponents.ElementTypeAdd element to the current menu list, creating it if it does not exist
e.ElementAdd element to the current menu list, creating it if it does not exist
Anything elseApply 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.

ChildAction
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 elseApply child to the <li> element

The b.MenuAHref constructor creates an entry for a menu list with a link wrapped inside it.

ModifierAction
b.ActiveMark the link as active
ChildAction
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.StylesApply child to the <li> element
gomponents.Nodeof type gomponents.AttributeTypeApply attribute to the link
gomponents.Nodeof type gomponents.ElementTypeAdd element to the entry
Anything elseApply 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.

Bulma examples

Example
Code
b.Menu(
	"General",
	e.A("Dashboard"),
	e.A("Customers"),
	"Administration",
	e.A("Team Settings"),
	b.MenuEntry(
		e.A(b.Active, "Manage Your Team"),
		b.MenuEntry(e.A("Members")),
		b.MenuEntry(e.A("Plugins")),
		b.MenuEntry(e.A("Add a member")),
	),
	e.A("Invitations"),
	e.A("Cloud Storage Environment Settings"),
	e.A("Authentication"),
	"Transactions",
	e.A("Payments"),
	e.A("Transfers"),
	e.A("Balance"),
)
ResultHTML